Re: [PATCH] workqueue: Remove incorrect "WARN_ON_ONCE(!list_empty(&worker->entry));" from dying worker
From: Tejun Heo
Date: Thu Aug 01 2024 - 19:14:17 EST
On Thu, Jul 25, 2024 at 09:04:37AM +0800, Lai Jiangshan wrote:
> From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>
>
> The commit 68f83057b913 ("workqueue: Reap workers via kthread_stop()
> and remove detach_completion") changes the procedure of destroying
> workers; the dying workers are kept in the cull_list in wake_dying_workers()
> with the pool lock held and removed from the cull_list by the newly
> added reap_dying_workers() without the pool lock.
>
> This can cause a warning if the dying worker is wokenup earlier than
> reaped as reported by Marc:
Applied to wq/for-6.11-fixes.
Thanks.
--
tejun