summaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2007-06-08 13:46:46 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-08 17:23:32 -0700
commita210906c1b791af1434323f69427286039c9c8b9 (patch)
tree17f3deeda2c7c6972b9a72113a14571c2cabaae7 /mm/shmem.c
parent9739ed1c8eafd554788d8e2ba09847b5718a34e7 (diff)
downloadlinux-stable-a210906c1b791af1434323f69427286039c9c8b9.tar.gz
linux-stable-a210906c1b791af1434323f69427286039c9c8b9.tar.bz2
linux-stable-a210906c1b791af1434323f69427286039c9c8b9.zip
mount -t tmpfs -o mpol=: check nodes online
Randy Dunlap reports that a tmpfs, mounted with NUMA mpol= specifying an offline node, crashes as soon as data is allocated upon it. Now restrict it to online nodes, where before it restricted to MAX_NUMNODES. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Robin Holt <holt@sgi.com> Cc: Christoph Lameter <clameter@sgi.com> Cc: Andi Kleen <ak@suse.de> Tested-and-acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index e537317bec4d..b6aae2b33393 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -967,6 +967,8 @@ static inline int shmem_parse_mpol(char *value, int *policy, nodemask_t *policy_
*nodelist++ = '\0';
if (nodelist_parse(nodelist, *policy_nodes))
goto out;
+ if (!nodes_subset(*policy_nodes, node_online_map))
+ goto out;
}
if (!strcmp(value, "default")) {
*policy = MPOL_DEFAULT;