From af3ad692800c4353c59b2156140f062784365cd6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Jan 2009 10:12:30 +1030 Subject: [PATCH] --- yaml --- r: 125707 b: refs/heads/master c: 2a53008033189ed09bfe241c6b33811ba4ce980d h: refs/heads/master i: 125705: 5237cbe6762f7ead75c2d6b16221c7001086dbdf 125703: 53da3b85b71043ae31fddb7c70c0ad7324144981 v: v3 --- [refs] | 2 +- trunk/lib/cpumask.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f766d8e99dad..c05cadcd1f92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5db0e1e9e0f30f160b832a0b5cd1131954bf4f6e +refs/heads/master: 2a53008033189ed09bfe241c6b33811ba4ce980d diff --git a/trunk/lib/cpumask.c b/trunk/lib/cpumask.c index 8e1496cb63f7..3389e2440da0 100644 --- a/trunk/lib/cpumask.c +++ b/trunk/lib/cpumask.c @@ -107,6 +107,14 @@ bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, int node) dump_stack(); } #endif + /* FIXME: Bandaid to save us from old primitives which go to NR_CPUS. */ + if (*mask) { + unsigned int tail; + tail = BITS_TO_LONGS(NR_CPUS - nr_cpumask_bits) * sizeof(long); + memset(cpumask_bits(*mask) + cpumask_size() - tail, + 0, tail); + } + return *mask != NULL; } EXPORT_SYMBOL(alloc_cpumask_var_node);