Commit 01424961 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] mempolicy.c GFP fix

zonelist_policy() forgot to mask non-zone bits from gfp when comparing
zone number with policy_zone. 
ACKed-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bc86120a
...@@ -661,7 +661,7 @@ static struct zonelist *zonelist_policy(unsigned int __nocast gfp, struct mempol ...@@ -661,7 +661,7 @@ static struct zonelist *zonelist_policy(unsigned int __nocast gfp, struct mempol
case MPOL_BIND: case MPOL_BIND:
/* Lower zones don't get a policy applied */ /* Lower zones don't get a policy applied */
/* Careful: current->mems_allowed might have moved */ /* Careful: current->mems_allowed might have moved */
if (gfp >= policy_zone) if ((gfp & GFP_ZONEMASK) >= policy_zone)
if (cpuset_zonelist_valid_mems_allowed(policy->v.zonelist)) if (cpuset_zonelist_valid_mems_allowed(policy->v.zonelist))
return policy->v.zonelist; return policy->v.zonelist;
/*FALL THROUGH*/ /*FALL THROUGH*/
......
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