projects
/
platform
/
kernel
/
kernel-mfld-blackbay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07555c9
)
net: Avoid race between network down and sysfs
author
Stephen Hemminger
<shemminger@vyatta.com>
Thu, 26 Feb 2009 06:49:24 +0000
(06:49 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 3 Mar 2009 08:47:46 +0000
(
00:47
-0800)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c
patch
|
blob
|
history
diff --git
a/net/core/net-sysfs.c
b/net/core/net-sysfs.c
index
6ac29a4
..
484f587
100644
(file)
--- a/
net/core/net-sysfs.c
+++ b/
net/core/net-sysfs.c
@@
-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;