summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-16 09:00:50 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-04-16 09:00:50 (GMT)
commit57d7a6009241fe04a699e5f65d55cf5cb7008fc7 (patch)
treeaf0d7728dafa87ce11635139e4667f2e18ea8a74 /net
parentcd5342d9055545624187a2d47e68bdabc1ca9963 (diff)
downloadlinux-57d7a6009241fe04a699e5f65d55cf5cb7008fc7.tar.xz
[NETNS]: Add netns refcnt debug into fib_info.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_semantics.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index a13c847..3b83c34 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;