diff options
-rw-r--r-- | net/core/dev.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 08dec6eb922b..e0489ca731c5 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -977,7 +977,12 @@ int register_netdevice_notifier(struct notifier_block *nb) int unregister_netdevice_notifier(struct notifier_block *nb) { - return notifier_chain_unregister(&netdev_chain, nb); + int err; + + rtnl_lock(); + err = notifier_chain_unregister(&netdev_chain, nb); + rtnl_unlock(); + return err; } /** |