From: Jiri Pirko Date: Tue, 20 Apr 2010 08:45:37 +0000 (-0700) Subject: net: emphasize rtnl lock required in call_netdevice_notifiers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab9304717f7624c41927f442e6b6d418b2d8b3e4;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 0d78e0454a6d..b31d5d69a467 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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); }