mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Chengyu Liu <lui2012qwq@gmail.com>
Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] regulator: disable disable_work for good in regulator_unregister()
Date: Wed, 4 Nov 2026 13:53:08 +0000	[thread overview]
Message-ID: <5e63dcea-a397-41a4-a647-a356ab67f1a9@sirena.org.uk> (raw)
In-Reply-To: <20261104134838.326041-1-lui2012qwq@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 804 bytes --]

On Wed, Nov 04, 2026 at 09:48:38PM +0800, Chengyu Liu wrote:
> regulator_unregister() stops rdev->disable_work with
> flush_work(&dw->work), which is a no-op for a delayed_work pending on
> the timer wheel: flush_work() only waits for a queued or running work
> item.  A disable deferred by a consumer's regulator_disable_deferred()
> therefore survives the provider's unbind, and regulator_disable_work()
> fires after device_unregister() has freed the rdev, dereferencing it
> via container_of().  Use-after-free.

Please don't send new patches in reply to old patches or serieses, this
makes it harder for both people and tools to understand what is going
on - it can bury things in mailboxes and make it difficult to keep track
of what current patches are, both for the new patches and the old ones.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-11-04 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 17:49 [PATCH] regulator: cancel disable_work synchronously " Chengyu Liu
2026-11-04 12:39 ` Mark Brown
2026-11-04 13:46   ` Chengyu Liu
2026-11-04 13:48 ` [PATCH v2] regulator: disable disable_work for good " Chengyu Liu
2026-11-04 13:53   ` Mark Brown [this message]
2026-11-04 13:58     ` Chengyu Liu
2026-11-04 14:44       ` Mark Brown
2026-11-08 12:28   ` Mark Brown
2026-11-04 14:07 Chengyu Liu

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=5e63dcea-a397-41a4-a647-a356ab67f1a9@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lui2012qwq@gmail.com \
    --cc=stable@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®