* [PATCH] get_nodes should ignore invalid node
@ 2007-08-22 2:07 Shaohua Li
0 siblings, 0 replies; only message in thread
From: Shaohua Li @ 2007-08-22 2:07 UTC (permalink / raw)
To: lkml; +Cc: Andrew Morton, clameter
get_nodes doesn't check if nodes in node mask are valid, cause a kernel
oops when an invalid node is used..
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Index: linux/mm/mempolicy.c
===================================================================
--- linux.orig/mm/mempolicy.c 2007-07-25 09:14:33.000000000 +0800
+++ linux/mm/mempolicy.c 2007-08-21 13:15:41.000000000 +0800
@@ -850,6 +850,8 @@ static int get_nodes(nodemask_t *nodes,
if (copy_from_user(nodes_addr(*nodes), nmask, nlongs*sizeof(unsigned long)))
return -EFAULT;
nodes_addr(*nodes)[nlongs-1] &= endmask;
+
+ nodes_and(*nodes, *nodes, node_online_map);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-22 2:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-22 2:07 [PATCH] get_nodes should ignore invalid node Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®