net: emphasize rtnl lock required in call_netdevice_notifiers
authorJiri Pirko <jpirko@redhat.com>
Tue, 20 Apr 2010 08:45:37 +0000 (01:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Apr 2010 08:45:37 +0000 (01:45 -0700)
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: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 0d78e0454a6dead3e89626bbab7b468c8c71ba6f..b31d5d69a467c531d68e350d4d02fb4acc08b1d7 100644 (file)
@@ -1435,6 +1435,7 @@ EXPORT_SYMBOL(unregister_netdevice_notifier);
 
 int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
 {
+       ASSERT_RTNL();
        return raw_notifier_call_chain(&netdev_chain, val, dev);
 }