aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2007-12-07 03:38:10 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:56:44 -0500
commit5a3e55d68ec5baac578bf32ba67607088c763657 (patch)
tree9e8f9dfae66c8a85735122ece8a9c85cdb5c31c4 /net/core
parentb84a2189c4e1835c51fd6b974a0497be9bc4ba87 (diff)
[NET]: Multiple namespaces in the all dst_ifdown routines.
Move dst entries to a namespace loopback to catch refcounting leaks. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index f538061f4b93..5c6cfc4e7fdb 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -279,11 +279,11 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
279 if (!unregister) { 279 if (!unregister) {
280 dst->input = dst->output = dst_discard; 280 dst->input = dst->output = dst_discard;
281 } else { 281 } else {
282 dst->dev = init_net.loopback_dev; 282 dst->dev = dst->dev->nd_net->loopback_dev;
283 dev_hold(dst->dev); 283 dev_hold(dst->dev);
284 dev_put(dev); 284 dev_put(dev);
285 if (dst->neighbour && dst->neighbour->dev == dev) { 285 if (dst->neighbour && dst->neighbour->dev == dev) {
286 dst->neighbour->dev = init_net.loopback_dev; 286 dst->neighbour->dev = dst->dev;
287 dev_put(dev); 287 dev_put(dev);
288 dev_hold(dst->neighbour->dev); 288 dev_hold(dst->neighbour->dev);
289 } 289 }