All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc Hartmayer" <mhartmay@linux.ibm.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>, linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <jiangshan.ljs@antgroup.com>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] workqueue: Remove incorrect "WARN_ON_ONCE(!list_empty(&worker->entry));" from dying worker
Date: Mon, 29 Jul 2024 13:39:12 +0200	[thread overview]
Message-ID: <87wml4s9zz.fsf@linux.ibm.com> (raw)
In-Reply-To: <20240725010437.694727-1-jiangshanlai@gmail.com>

On Thu, Jul 25, 2024 at 09:04 AM +0800, Lai Jiangshan <jiangshanlai@gmail.com> wrote:
> From: Lai Jiangshan <jiangshan.ljs@antgroup.com>
>
> 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:
>

[…snip]

The crash I reported is fixed by this patch. But I can't say whether the
removal of the warning is OK.

--

Kind regards / Beste Grüße
   Marc Hartmayer

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Wolfgang Wendt
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

  reply	other threads:[~2024-07-29 11:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  1:04 [PATCH] workqueue: Remove incorrect "WARN_ON_ONCE(!list_empty(&worker->entry));" from dying worker Lai Jiangshan
2024-07-29 11:39 ` Marc Hartmayer [this message]
2024-08-01  3:11   ` Lai Jiangshan
2024-08-02  7:09     ` Marc Hartmayer
2024-08-01 23:14 ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wml4s9zz.fsf@linux.ibm.com \
    --to=mhartmay@linux.ibm.com \
    --cc=jiangshan.ljs@antgroup.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.