projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.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
|
blame
|
history
diff --git
a/net/core/net-sysfs.c
b/net/core/net-sysfs.c
index 6ac29a46e23e188be0c3f246c7ff77e538d04ab1..484f58750eba0438cff11dcf0979ceb4ef46738b 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;