aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dst.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/dst.c b/net/core/dst.c
index 38c741ac5d08..ad5ffa19d809 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -278,13 +278,13 @@ static inline void dst_ifdown(struct dst_entry *dst, struct net_device *dev,
278 if (!unregister) { 278 if (!unregister) {
279 dst->input = dst->output = dst_discard; 279 dst->input = dst->output = dst_discard;
280 } else { 280 } else {
281 dst->dev = &loopback_dev; 281 dst->dev = loopback_dev;
282 dev_hold(&loopback_dev); 282 dev_hold(dst->dev);
283 dev_put(dev); 283 dev_put(dev);
284 if (dst->neighbour && dst->neighbour->dev == dev) { 284 if (dst->neighbour && dst->neighbour->dev == dev) {
285 dst->neighbour->dev = &loopback_dev; 285 dst->neighbour->dev = loopback_dev;
286 dev_put(dev); 286 dev_put(dev);
287 dev_hold(&loopback_dev); 287 dev_hold(dst->neighbour->dev);
288 } 288 }
289 } 289 }
290} 290}