From 70b9eca4bb8106e887498065740d0e8ffc79a352 Mon Sep 17 00:00:00 2001 From: Brent Casavant Date: Mon, 23 Aug 2004 21:30:27 -0700 Subject: [PATCH] [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/mempolicy.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index d06eabbf74f0b..caaa6c34ae44b 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; -- 2.53.0