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

[NETNS]: Add netns refcnt debug for dst ops.

Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c5da49a
...@@ -2622,7 +2622,7 @@ static int ip6_route_net_init(struct net *net) ...@@ -2622,7 +2622,7 @@ static int ip6_route_net_init(struct net *net)
GFP_KERNEL); GFP_KERNEL);
if (!net->ipv6.ip6_dst_ops) if (!net->ipv6.ip6_dst_ops)
goto out; goto out;
net->ipv6.ip6_dst_ops->dst_net = net; net->ipv6.ip6_dst_ops->dst_net = hold_net(net);
net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template, net->ipv6.ip6_null_entry = kmemdup(&ip6_null_entry_template,
sizeof(*net->ipv6.ip6_null_entry), sizeof(*net->ipv6.ip6_null_entry),
...@@ -2669,6 +2669,7 @@ out: ...@@ -2669,6 +2669,7 @@ out:
return ret; return ret;
out_ip6_dst_ops: out_ip6_dst_ops:
release_net(net->ipv6.ip6_dst_ops->dst_net);
kfree(net->ipv6.ip6_dst_ops); kfree(net->ipv6.ip6_dst_ops);
goto out; goto out;
} }
...@@ -2684,6 +2685,7 @@ static void ip6_route_net_exit(struct net *net) ...@@ -2684,6 +2685,7 @@ static void ip6_route_net_exit(struct net *net)
kfree(net->ipv6.ip6_prohibit_entry); kfree(net->ipv6.ip6_prohibit_entry);
kfree(net->ipv6.ip6_blk_hole_entry); kfree(net->ipv6.ip6_blk_hole_entry);
#endif #endif
release_net(net->ipv6.ip6_dst_ops->dst_net);
kfree(net->ipv6.ip6_dst_ops); kfree(net->ipv6.ip6_dst_ops);
} }
......
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