diff options
author | Andi Kleen <ak@suse.de> | 2006-02-20 18:27:59 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-20 20:00:10 -0800 |
commit | a9c930bac163c5e616ca0ba9378e7dc746c93227 (patch) | |
tree | 58ff339858cee3a87893c094561eb72381044a08 /mm | |
parent | c255d844dd73616f23e4b4733edcc2e5fa4042b2 (diff) | |
download | blackbird-op-linux-a9c930bac163c5e616ca0ba9378e7dc746c93227.tar.gz blackbird-op-linux-a9c930bac163c5e616ca0ba9378e7dc746c93227.zip |
[PATCH] Fix units in mbind check
maxnode is a bit index and can't be directly compared against a byte length
like PAGE_SIZE
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Chris Wright <chrisw@sous-sol.org>
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index bedfa4f09c80..6422fe478113 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -808,7 +808,7 @@ static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask, nodes_clear(*nodes); if (maxnode == 0 || !nmask) return 0; - if (maxnode > PAGE_SIZE) + if (maxnode > PAGE_SIZE*BITS_PER_BYTE) return -EINVAL; nlongs = BITS_TO_LONGS(maxnode); |