aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-13 21:23:44 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-13 21:23:44 -0400
commitdd4efa44ebf2a8a0e5edf60a53eadec981b4b10a (patch)
treedd6e750c3e7228abb1f922de240b86d7d12d14bf /include/net
parent1a04392bd6439876b1552793389cbb5be356ea54 (diff)
parent046d20b73960b7a2474b6d5e920d54c3fd7c23fe (diff)
Merge branch 'master'
Diffstat (limited to 'include/net')
-rw-r--r--include/net/inet_timewait_sock.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 4ade56ef3a4..28f7b210350 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -19,6 +19,7 @@
#include <linux/ip.h>
#include <linux/list.h>
+#include <linux/module.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/workqueue.h>
@@ -193,11 +194,13 @@ static inline u32 inet_rcv_saddr(const struct sock *sk)
static inline void inet_twsk_put(struct inet_timewait_sock *tw)
{
if (atomic_dec_and_test(&tw->tw_refcnt)) {
+ struct module *owner = tw->tw_prot->owner;
#ifdef SOCK_REFCNT_DEBUG
printk(KERN_DEBUG "%s timewait_sock %p released\n",
tw->tw_prot->name, tw);
#endif
kmem_cache_free(tw->tw_prot->twsk_slab, tw);
+ module_put(owner);
}
}