Skip to content

Commit

Permalink
[NET]: Check RTNL status in unregister_netdevice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 28, 2008
1 parent aebcf82 commit a662071
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a662071

Please sign in to comment.