projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4729583
)
cpuset: fix a race condition in __cpuset_node_allowed_softwall()
author
Li Zefan
<
[email protected]
>
Thu, 27 Feb 2014 10:19:36 +0000
(18:19 +0800)
committer
Tejun Heo
<
[email protected]
>
Thu, 27 Feb 2014 14:39:54 +0000
(09:39 -0500)
It's not safe to access task's cpuset after releasing task_lock().
Holding callback_mutex won't help.
Cc: <
[email protected]
>
Signed-off-by: Li Zefan <
[email protected]
>
Signed-off-by: Tejun Heo <
[email protected]
>
kernel/cpuset.c
patch
|
blob
|
history
diff --git
a/kernel/cpuset.c
b/kernel/cpuset.c
index dba9e4aef69aefce92aa7f0cc1a31996c2da64d9..e6b1b66afe526acfa2a9ecbfc5bad9da76e8d9b4 100644
(file)
--- a/
kernel/cpuset.c
+++ b/
kernel/cpuset.c
@@
-2482,9
+2482,9
@@
int __cpuset_node_allowed_softwall(int node, gfp_t gfp_mask)
task_lock(current);
cs = nearest_hardwall_ancestor(task_cs(current));
+ allowed = node_isset(node, cs->mems_allowed);
task_unlock(current);
- allowed = node_isset(node, cs->mems_allowed);
mutex_unlock(&callback_mutex);
return allowed;
}