Commit cd5342d9 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NETNS]: Add netns refcnt debug for timewait buckets.

Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65a18ec5
...@@ -57,6 +57,7 @@ void inet_twsk_put(struct inet_timewait_sock *tw) ...@@ -57,6 +57,7 @@ void inet_twsk_put(struct inet_timewait_sock *tw)
printk(KERN_DEBUG "%s timewait_sock %p released\n", printk(KERN_DEBUG "%s timewait_sock %p released\n",
tw->tw_prot->name, tw); tw->tw_prot->name, tw);
#endif #endif
release_net(twsk_net(tw));
kmem_cache_free(tw->tw_prot->twsk_prot->twsk_slab, tw); kmem_cache_free(tw->tw_prot->twsk_prot->twsk_slab, tw);
module_put(owner); module_put(owner);
} }
...@@ -124,7 +125,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat ...@@ -124,7 +125,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
tw->tw_hash = sk->sk_hash; tw->tw_hash = sk->sk_hash;
tw->tw_ipv6only = 0; tw->tw_ipv6only = 0;
tw->tw_prot = sk->sk_prot_creator; tw->tw_prot = sk->sk_prot_creator;
twsk_net_set(tw, sock_net(sk)); twsk_net_set(tw, hold_net(sock_net(sk)));
atomic_set(&tw->tw_refcnt, 1); atomic_set(&tw->tw_refcnt, 1);
inet_twsk_dead_node_init(tw); inet_twsk_dead_node_init(tw);
__module_get(tw->tw_prot->owner); __module_get(tw->tw_prot->owner);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment