From: Tejun Heo Date: Fri, 2 Jul 2010 08:03:51 +0000 (+0200) Subject: workqueue: fix incorrect cpu number BUG_ON() in get_work_gcwq() X-Git-Tag: v2.6.36-rc1~506^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1e453d2799760ecf2e09ecd45b80edbe7ff540e;p=thirdparty%2Fkernel%2Flinux.git workqueue: fix incorrect cpu number BUG_ON() in get_work_gcwq() get_work_gcwq() was incorrectly triggering BUG_ON() if cpu number is equal to or higher than num_possible_cpus() instead of nr_cpu_ids. Fix it. Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b59c946433f4b..0c485a5380990 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -445,7 +445,7 @@ static struct global_cwq *get_work_gcwq(struct work_struct *work) if (cpu == NR_CPUS) return NULL; - BUG_ON(cpu >= num_possible_cpus()); + BUG_ON(cpu >= nr_cpu_ids); return get_gcwq(cpu); }