Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9839
b: refs/heads/master
c: eeb2b85
h: refs/heads/master
i:
  9837: 612d19e
  9835: 0fa6792
  9831: ea427c2
  9823: 0c96a73
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Oct 11, 2005
1 parent 1b98d4d commit 457e794
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a9bc9bb4d3a4570a8a48aadf071b91e657adb89
refs/heads/master: eeb2b8560676e454ad37ee30b49bc7d897edc9be
3 changes: 3 additions & 0 deletions trunk/include/net/inet_timewait_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
}
}

Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/inet_timewait_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
tw->tw_prot = sk->sk_prot_creator;
atomic_set(&tw->tw_refcnt, 1);
inet_twsk_dead_node_init(tw);
__module_get(tw->tw_prot->owner);
}

return tw;
Expand Down

0 comments on commit 457e794

Please sign in to comment.