diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b2975e44dffa..7d231bbd1659 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1500,7 +1500,7 @@ static void wq_update_node_max_active(struct workqueue_struct *wq, int off_cpu) lockdep_assert_held(&wq->mutex); - if (!cpumask_test_cpu(off_cpu, effective)) + if (off_cpu >= 0 && !cpumask_test_cpu(off_cpu, effective)) off_cpu = -1; total_cpus = cpumask_weight_and(effective, cpu_online_mask);