From: Denis V. Lunev Date: Wed, 16 Apr 2008 09:00:50 +0000 (-0700) Subject: [NETNS]: Add netns refcnt debug into fib_info. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57d7a6009241fe04a699e5f65d55cf5cb7008fc7;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [NETNS]: Add netns refcnt debug into fib_info. Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index a13c84763d4c..3b83c34019fc 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -152,6 +152,7 @@ void free_fib_info(struct fib_info *fi) nh->nh_dev = NULL; } endfor_nexthops(fi); fib_info_cnt--; + release_net(fi->fib_net); kfree(fi); } @@ -730,7 +731,7 @@ struct fib_info *fib_create_info(struct fib_config *cfg) goto failure; fib_info_cnt++; - fi->fib_net = net; + fi->fib_net = hold_net(net); fi->fib_protocol = cfg->fc_protocol; fi->fib_flags = cfg->fc_flags; fi->fib_priority = cfg->fc_priority;