Commit b14d8791 authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Linus Torvalds

[PATCH] mempolicy can select the wrong policy

mempolicy.c code will return the wrong policy in some cases.
Signed-off-by: default avatarAndrea Arcangeli <andrea@novell.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fc2219b2
...@@ -900,13 +900,13 @@ sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end) ...@@ -900,13 +900,13 @@ sp_lookup(struct shared_policy *sp, unsigned long start, unsigned long end)
while (n) { while (n) {
struct sp_node *p = rb_entry(n, struct sp_node, nd); struct sp_node *p = rb_entry(n, struct sp_node, nd);
if (start >= p->end) {
if (start >= p->end)
n = n->rb_right; n = n->rb_right;
} else if (end < p->start) { else if (end <= p->start)
n = n->rb_left; n = n->rb_left;
} else { else
break; break;
}
} }
if (!n) if (!n)
return NULL; return NULL;
......
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