提交 5a5990d3 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

net: Avoid race between network down and sysfs

Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 07555c98
......@@ -77,7 +77,9 @@ static ssize_t netdev_store(struct device *dev, struct device_attribute *attr,
if (endp == buf)
goto err;
rtnl_lock();
if (!rtnl_trylock())
return -ERESTARTSYS;
if (dev_isalive(net)) {
if ((ret = (*set)(net, new)) == 0)
ret = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册