diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-16 05:01:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-16 05:01:34 -0400 |
commit | 48115becf6ad9c0e700ff7c1792b7f2a288ef8fb (patch) | |
tree | b0ec6b3e4094e661dbea043d50acb6c5824e542a | |
parent | 8c5da49a63c7675a3e137eb384b982e562622342 (diff) |
[NETNS]: Add netns refcnt debug for dst ops.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv6/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6293cb91ed1d..210a079cfc6f 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2622,7 +2622,7 @@ static int ip6_route_net_init(struct net *net) | |||
2622 | GFP_KERNEL); | 2622 | GFP_KERNEL); |
2623 | if (!net->ipv6.ip6_dst_ops) | 2623 | if (!net->ipv6.ip6_dst_ops) |
2624 | goto out; | 2624 | goto out; |
2625 | net->ipv6.ip6_dst_ops->dst_net = net; | 2625 | net->ipv6.ip6_dst_ops->dst_net = hold_net(net); |
2626 | 2626 | ||
2627 | net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template, | 2627 | net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template, |
2628 | sizeof(*net->ipv6.ip6_null_entry), | 2628 | sizeof(*net->ipv6.ip6_null_entry), |
@@ -2669,6 +2669,7 @@ out: | |||
2669 | return ret; | 2669 | return ret; |
2670 | 2670 | ||
2671 | out_ip6_dst_ops: | 2671 | out_ip6_dst_ops: |
2672 | release_net(net->ipv6.ip6_dst_ops->dst_net); | ||
2672 | kfree(net->ipv6.ip6_dst_ops); | 2673 | kfree(net->ipv6.ip6_dst_ops); |
2673 | goto out; | 2674 | goto out; |
2674 | } | 2675 | } |
@@ -2684,6 +2685,7 @@ static void ip6_route_net_exit(struct net *net) | |||
2684 | kfree(net->ipv6.ip6_prohibit_entry); | 2685 | kfree(net->ipv6.ip6_prohibit_entry); |
2685 | kfree(net->ipv6.ip6_blk_hole_entry); | 2686 | kfree(net->ipv6.ip6_blk_hole_entry); |
2686 | #endif | 2687 | #endif |
2688 | release_net(net->ipv6.ip6_dst_ops->dst_net); | ||
2687 | kfree(net->ipv6.ip6_dst_ops); | 2689 | kfree(net->ipv6.ip6_dst_ops); |
2688 | } | 2690 | } |
2689 | 2691 | ||