diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-16 11:01:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-16 11:01:11 +0200 |
commit | 8c5da49a63c7675a3e137eb384b982e562622342 (patch) | |
tree | b722d9b1849edfc6adec10850fa47e675a77d7bc /net/ipv4 | |
parent | [NETNS]: Add netns refcnt debug into fib_info. (diff) | |
download | linux-8c5da49a63c7675a3e137eb384b982e562622342.tar.xz linux-8c5da49a63c7675a3e137eb384b982e562622342.zip |
[NETNS]: Add netns refcnt debug for inet bind buckets.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inet_hashtables.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 32ca2f8b581c..1612184ecc6f 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c @@ -35,7 +35,7 @@ struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); if (tb != NULL) { - tb->ib_net = net; + tb->ib_net = hold_net(net); tb->port = snum; tb->fastreuse = 0; INIT_HLIST_HEAD(&tb->owners); @@ -51,6 +51,7 @@ void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket { if (hlist_empty(&tb->owners)) { __hlist_del(&tb->node); + release_net(tb->ib_net); kmem_cache_free(cachep, tb); } } |