Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e46b66bc authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller
Browse files

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: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c2ab7ac2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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))