workqueue: defer the worker wakeup outside pool->lock in process_one_work()

Use kick_pool_pick() to select and claim the worker under pool->lock and
issue the wakeup with wake_up_process() after the lock is dropped.

Unlike __queue_work(), this path has no surrounding RCU section, so take
rcu_read_lock() before dropping pool->lock to keep the picked worker's
task_struct valid across the wakeup.

Signed-off-by: Breno Leitao <leitao@debian.org>
Tested-by: Krishna Magar <kmagar@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Breno Leitao 2026-06-26 02:57:55 -07:00 • committed by Tejun Heo
commit f504706a25