Commit b8afe641 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

net-sysfs: Use rtnl_trylock in wireless sysfs methods.

The wireless sysfs methods like the rest of the networking sysfs
methods are removed with the rtnl_lock held and block until
the existing methods stop executing.  So use rtnl_trylock
and restart_syscall so that the code continues to work.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 88af182e
...@@ -410,7 +410,8 @@ static ssize_t wireless_show(struct device *d, char *buf, ...@@ -410,7 +410,8 @@ static ssize_t wireless_show(struct device *d, char *buf,
const struct iw_statistics *iw; const struct iw_statistics *iw;
ssize_t ret = -EINVAL; ssize_t ret = -EINVAL;
rtnl_lock(); if (!rtnl_trylock())
return restart_syscall();
if (dev_isalive(dev)) { if (dev_isalive(dev)) {
iw = get_wireless_stats(dev); iw = get_wireless_stats(dev);
if (iw) if (iw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment