mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
net: Added ASSERT_RTNL() to dev_open() and dev_close().
dev_open() and dev_close() must be called holding the RTNL, since they call device functions and netdevice notifiers that are promised the RTNL. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c2ab7ac225
commit
e46b66bc42
1 changed files with 4 additions and 0 deletions
|
@ -994,6 +994,8 @@ int dev_open(struct net_device *dev)
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
ASSERT_RTNL();
|
||||
|
||||
/*
|
||||
* Is it already up?
|
||||
*/
|
||||
|
@ -1060,6 +1062,8 @@ int dev_open(struct net_device *dev)
|
|||
*/
|
||||
int dev_close(struct net_device *dev)
|
||||
{
|
||||
ASSERT_RTNL();
|
||||
|
||||
might_sleep();
|
||||
|
||||
if (!(dev->flags & IFF_UP))
|
||||
|
|
Loading…
Reference in a new issue