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:
3c8d61b
)
[PATCH] cpuset: fix return without releasing semaphore
author
Bob Picco
<
[email protected]
>
Mon, 14 Nov 2005 00:06:35 +0000
(16:06 -0800)
committer
Linus Torvalds
<
[email protected]
>
Mon, 14 Nov 2005 02:14:11 +0000
(18:14 -0800)
It is wrong to acquire the semaphore and then return from
cpuset_zone_allowed without releasing it.
Signed-off-by: Bob Picco <
[email protected]
>
Acked-by: Paul Jackson <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/cpuset.c
patch
|
blob
|
history
diff --git
a/kernel/cpuset.c
b/kernel/cpuset.c
index 5a737ed9dac79d8cf2fe184e6a79574680afa01b..7430640f9816dcf7e82c9aad6b445f6678e9be1f 100644
(file)
--- a/
kernel/cpuset.c
+++ b/
kernel/cpuset.c
@@
-1809,11
+1809,12
@@
int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask)
if (gfp_mask & __GFP_HARDWALL) /* If hardwall request, stop here */
return 0;
+ if (current->flags & PF_EXITING) /* Let dying task have memory */
+ return 1;
+
/* Not hardwall and node outside mems_allowed: scan up cpusets */
down(&callback_sem);
- if (current->flags & PF_EXITING) /* Let dying task have memory */
- return 1;
task_lock(current);
cs = nearest_exclusive_ancestor(current->cpuset);
task_unlock(current);