diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-12 22:21:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:57:43 -0500 |
commit | a66207121f85c54a3df4d347a3c5bdf6cb154b09 (patch) | |
tree | fdcce4dae89c2c4d0e0978b5be80e99dcb54a693 | |
parent | aebcf82c1fe9231be5cb4f9c1362d5db39e7d7b2 (diff) |
[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 <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 4ced3836690b..7153e94f50ad 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3971,6 +3971,8 @@ void synchronize_net(void) | |||
3971 | 3971 | ||
3972 | void unregister_netdevice(struct net_device *dev) | 3972 | void unregister_netdevice(struct net_device *dev) |
3973 | { | 3973 | { |
3974 | ASSERT_RTNL(); | ||
3975 | |||
3974 | rollback_registered(dev); | 3976 | rollback_registered(dev); |
3975 | /* Finish processing unregister after unlock */ | 3977 | /* Finish processing unregister after unlock */ |
3976 | net_set_todo(dev); | 3978 | net_set_todo(dev); |