summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-07-29 21:20:40 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-07-29 21:20:40 +0300
commit4b20426d044163df0ff9d868e9767ca9e65dd36c (patch)
treeba90cbc9f820c5635da7fd18acbbf4804e7ac87a /kernel
parent506e6dfb0f1131f104df66ccae1197bdf8f1b6b0 (diff)
parent46a4d679ef88285ea17c3e1e4fed330be2044f21 (diff)
downloadlinux-4b20426d044163df0ff9d868e9767ca9e65dd36c.tar.xz
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()
Diffstat (limited to 'kernel')
-rw-r--r--kernel/workqueue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 1ea50f6be843..aa8a82bc6738 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5001,7 +5001,10 @@ static void unbind_workers(int cpu)
for_each_pool_worker(worker, pool) {
kthread_set_per_cpu(worker->task, -1);
- WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
+ if (cpumask_intersects(wq_unbound_cpumask, cpu_active_mask))
+ WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
+ else
+ WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
}
mutex_unlock(&wq_pool_attach_mutex);