aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorBrent Casavant <bcasavan@sgi.com>2004-08-23 21:30:27 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:30:27 -0700
commit70b9eca4bb8106e887498065740d0e8ffc79a352 (patch)
tree1e10f6f451fd757fb9c44c68b2b8a81b9f582853 /mm
parentc41c607ce5e7de56897002dfa376f8451d797d19 (diff)
downloadhistory-70b9eca4bb8106e887498065740d0e8ffc79a352.tar.gz
[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: Brent Casavant <bcasavan@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mempolicy.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d06eabbf74f0b0..caaa6c34ae44b6 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -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;