From: Herbert Xu Date: Thu, 13 Dec 2007 03:21:56 +0000 (-0800) Subject: [NET]: Check RTNL status in unregister_netdevice X-Git-Tag: v2.6.25-rc1~1162^2~1113 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a66207121f85c54a3df4d347a3c5bdf6cb154b09;p=linux-2.6-omap-h63xx.git [NET]: Check RTNL status in unregister_netdevice The caller must hold the RTNL so let's check it in unregister_netdevice. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 4ced3836690..7153e94f50a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3971,6 +3971,8 @@ void synchronize_net(void) void unregister_netdevice(struct net_device *dev) { + ASSERT_RTNL(); + rollback_registered(dev); /* Finish processing unregister after unlock */ net_set_todo(dev);