]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET]: Check RTNL status in unregister_netdevice
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 13 Dec 2007 03:21:56 +0000 (19:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:57:43 +0000 (14:57 -0800)
The caller must hold the RTNL so let's check it in unregister_netdevice.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 4ced3836690ba950ddcffbc027107987bfdb3964..7153e94f50ad88c701a39f385ffd71b2ac6b5517 100644 (file)
@@ -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);