From: Rusty Russell Date: Sun, 11 Jan 2009 05:58:09 +0000 (-0800) Subject: cpumask: convert lib/smp_processor_id to new cpumask ops X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4ab0a9409af5fad74ad1fc9e46d5a8b460f353e9;p=linux-2.6-omap-h63xx.git cpumask: convert lib/smp_processor_id to new cpumask ops Impact: fix debug_smp_processor_id() for CONFIG_CPUMASK_OFFSTACK=y The scheduler now uses the new cpumask API, which deals up to nr_cpumask_bits, whereas the API used NR_CPUS bits. If CONFIG_CPUMASK_OFFSTACK=y these two are not equal, so the top bits are undefined. Leading to bug 12518 "BUG: using smp_processor_id() in preemptible [00000000] code: dellWirelessCtl/..." The fix is simple: use the modern API in the check. Signed-off-by: Rusty Russell Signed-off-by: Mike Travis Signed-off-by: Ingo Molnar --- diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 0f8fc22ed10..4689cb073da 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c @@ -22,7 +22,7 @@ notrace unsigned int debug_smp_processor_id(void) * Kernel threads bound to a single CPU can safely use * smp_processor_id(): */ - if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu))) + if (cpumask_equal(¤t->cpus_allowed, cpumask_of(this_cpu))) goto out; /*