Commit 70b9eca4 authored by Brent Casavant's avatar Brent Casavant Committed by Linus Torvalds

[PATCH] Fix get_nodes() mask miscalculation

It appears there is a nodemask miscalculation in the get_nodes() function
in mm/mempolicy.c.  This bug has two effects:

1. It is impossible to specify a length 1 nodemask.
2. It is impossible to specify a nodemask containing the last node.

The following patch has been confirmed to solve both problems.
Signed-off-by: default avatarBrent Casavant <bcasavan@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c41c607c
......@@ -132,7 +132,6 @@ static int get_nodes(unsigned long *nodes, unsigned long __user *nmask,
unsigned long nlongs;
unsigned long endmask;
--maxnode;
bitmap_zero(nodes, MAX_NUMNODES);
if (maxnode == 0 || !nmask)
return 0;
......
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