Commit ab930471 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: emphasize rtnl lock required in call_netdevice_notifiers

Since netdev_chain is guarded by rtnl_lock, ASSERT_RTNL should be
present here to make sure that all callers of call_netdevice_notifiers
does the locking properly.
Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b249dcb8
...@@ -1435,6 +1435,7 @@ EXPORT_SYMBOL(unregister_netdevice_notifier); ...@@ -1435,6 +1435,7 @@ EXPORT_SYMBOL(unregister_netdevice_notifier);
int call_netdevice_notifiers(unsigned long val, struct net_device *dev) int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
{ {
ASSERT_RTNL();
return raw_notifier_call_chain(&netdev_chain, val, dev); return raw_notifier_call_chain(&netdev_chain, val, dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment