Commit 5563e770 authored by Bob Picco's avatar Bob Picco Committed by Linus Torvalds
Browse files

[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: default avatarBob Picco <>
Acked-by: default avatarPaul Jackson <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 3c8d61bc
......@@ -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 */
if (current->flags & PF_EXITING) /* Let dying task have memory */
return 1;
cs = nearest_exclusive_ancestor(current->cpuset);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment