History

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.

Tejun Heo committed 16 years ago

Commit a1e453d1 parent 4ce48b31 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -445,7 +445,7 @@ static struct global_cwq *get_work_gcwq(struct work_struct *work) · 444 unmodified lines
445 if (cpu == NR_CPUS)445 if (cpu == NR_CPUS)
446 return NULL;446 return NULL;
447 447
448 BUG_ON(cpu >= num_possible_cpus());448 BUG_ON(cpu >= nr_cpu_ids);
449 return get_gcwq(cpu);449 return get_gcwq(cpu);
450}450}
451 451