diff --git a/[refs] b/[refs] index a1b7c54fa887..4ff21e1e925d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 06a59ecb921de1d44efcf2cdf543bc689fe2e0d8 +refs/heads/master: 850a545bd8a41648445bfc5541afe36ca105b0b8 diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index cbb5918e4fc5..09aef266d4d1 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -5235,7 +5235,7 @@ static void rollback_registered_many(struct list_head *head) dev = list_first_entry(head, struct net_device, unreg_list); call_netdevice_notifiers(NETDEV_UNREGISTER_BATCH, dev); - rcu_barrier(); + synchronize_net(); list_for_each_entry(dev, head, unreg_list) dev_put(dev); @@ -5748,6 +5748,12 @@ void netdev_run_todo(void) __rtnl_unlock(); + /* Wait for rcu callbacks to finish before attempting to drain + * the device list. This usually avoids a 250ms wait. + */ + if (!list_empty(&list)) + rcu_barrier(); + while (!list_empty(&list)) { struct net_device *dev = list_first_entry(&list, struct net_device, todo_list);