Skip to content

Commit 4b20426

Browse files
committed
Merge tag 'wq-for-5.19-rc8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo: "Just one commit to suppress a spurious warning added during the 5.19 cycle" * tag 'wq-for-5.19-rc8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Avoid a false warning in unbind_workers()
2 parents 506e6df + 46a4d67 commit 4b20426

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/workqueue.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5001,7 +5001,10 @@ static void unbind_workers(int cpu)
50015001

50025002
for_each_pool_worker(worker, pool) {
50035003
kthread_set_per_cpu(worker->task, -1);
5004-
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
5004+
if (cpumask_intersects(wq_unbound_cpumask, cpu_active_mask))
5005+
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
5006+
else
5007+
WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
50055008
}
50065009

50075010
mutex_unlock(&wq_pool_attach_mutex);

0 commit comments

Comments
 (0)