提交 e46b66bc 编写于 作者: B Ben Hutchings 提交者: David S. Miller

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: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c2ab7ac2
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册