diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 7 | ||||
-rw-r--r-- | net/core/dst.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 8ce3f74cd6b9..ab9b8d0d115e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -6402,7 +6402,7 @@ int __netdev_update_features(struct net_device *dev) | |||
6402 | struct net_device *upper, *lower; | 6402 | struct net_device *upper, *lower; |
6403 | netdev_features_t features; | 6403 | netdev_features_t features; |
6404 | struct list_head *iter; | 6404 | struct list_head *iter; |
6405 | int err = 0; | 6405 | int err = -1; |
6406 | 6406 | ||
6407 | ASSERT_RTNL(); | 6407 | ASSERT_RTNL(); |
6408 | 6408 | ||
@@ -6419,7 +6419,7 @@ int __netdev_update_features(struct net_device *dev) | |||
6419 | features = netdev_sync_upper_features(dev, upper, features); | 6419 | features = netdev_sync_upper_features(dev, upper, features); |
6420 | 6420 | ||
6421 | if (dev->features == features) | 6421 | if (dev->features == features) |
6422 | return 0; | 6422 | goto sync_lower; |
6423 | 6423 | ||
6424 | netdev_dbg(dev, "Features changed: %pNF -> %pNF\n", | 6424 | netdev_dbg(dev, "Features changed: %pNF -> %pNF\n", |
6425 | &dev->features, &features); | 6425 | &dev->features, &features); |
@@ -6434,6 +6434,7 @@ int __netdev_update_features(struct net_device *dev) | |||
6434 | return -1; | 6434 | return -1; |
6435 | } | 6435 | } |
6436 | 6436 | ||
6437 | sync_lower: | ||
6437 | /* some features must be disabled on lower devices when disabled | 6438 | /* some features must be disabled on lower devices when disabled |
6438 | * on an upper device (think: bonding master or bridge) | 6439 | * on an upper device (think: bonding master or bridge) |
6439 | */ | 6440 | */ |
@@ -6443,7 +6444,7 @@ int __netdev_update_features(struct net_device *dev) | |||
6443 | if (!err) | 6444 | if (!err) |
6444 | dev->features = features; | 6445 | dev->features = features; |
6445 | 6446 | ||
6446 | return 1; | 6447 | return err < 0 ? 0 : 1; |
6447 | } | 6448 | } |
6448 | 6449 | ||
6449 | /** | 6450 | /** |
diff --git a/net/core/dst.c b/net/core/dst.c index 2a1818065e12..e6dc77252fe9 100644 --- a/net/core/dst.c +++ b/net/core/dst.c | |||
@@ -306,7 +306,7 @@ void dst_release(struct dst_entry *dst) | |||
306 | if (unlikely(newrefcnt < 0)) | 306 | if (unlikely(newrefcnt < 0)) |
307 | net_warn_ratelimited("%s: dst:%p refcnt:%d\n", | 307 | net_warn_ratelimited("%s: dst:%p refcnt:%d\n", |
308 | __func__, dst, newrefcnt); | 308 | __func__, dst, newrefcnt); |
309 | if (unlikely(dst->flags & DST_NOCACHE) && !newrefcnt) | 309 | if (!newrefcnt && unlikely(dst->flags & DST_NOCACHE)) |
310 | call_rcu(&dst->rcu_head, dst_destroy_rcu); | 310 | call_rcu(&dst->rcu_head, dst_destroy_rcu); |
311 | } | 311 | } |
312 | } | 312 | } |