* [PATCH net-next-2.6] net: emphasize rtnl lock required in call_netdevice_notifiers
@ 2010-04-20 8:37 Jiri Pirko
2010-04-20 8:45 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2010-04-20 8:37 UTC (permalink / raw)
To: netdev; +Cc: davem, eric.dumazet
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>
diff --git a/net/core/dev.c b/net/core/dev.c
index 05a2b29..a7f13a5 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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-20 8:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 8:37 [PATCH net-next-2.6] net: emphasize rtnl lock required in call_netdevice_notifiers Jiri Pirko
2010-04-20 8:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox