diff options
-rw-r--r-- | net/core/dev.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index bcb05cb799c1..ec11d757c1fc 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5954,7 +5954,10 @@ EXPORT_SYMBOL(free_netdev); | |||
5954 | void synchronize_net(void) | 5954 | void synchronize_net(void) |
5955 | { | 5955 | { |
5956 | might_sleep(); | 5956 | might_sleep(); |
5957 | synchronize_rcu(); | 5957 | if (rtnl_is_locked()) |
5958 | synchronize_rcu_expedited(); | ||
5959 | else | ||
5960 | synchronize_rcu(); | ||
5958 | } | 5961 | } |
5959 | EXPORT_SYMBOL(synchronize_net); | 5962 | EXPORT_SYMBOL(synchronize_net); |
5960 | 5963 | ||