mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] cpuset: fix return without releasing semaphore
It is wrong to acquire the semaphore and then return from cpuset_zone_allowed without releasing it. Signed-off-by: Bob Picco <bob.picco@hp.com> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
3c8d61bcf2
commit
5563e77078
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue