Skip to content

Commit

Permalink
workqueue: fix incorrect cpu number BUG_ON() in get_work_gcwq()
Browse files Browse the repository at this point in the history
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 <tj@kernel.org>
  • Loading branch information
Tejun Heo committed Jul 2, 2010
1 parent 4ce48b3 commit a1e453d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a1e453d

Please sign in to comment.