mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Sebastian Reichel <sre@kernel.org>, Maoyi Xie <maoyixie.tju@gmail.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 stable@vger.kernel.org,
	"H . Nikolaus Schaller" <hns@goldelico.com>,
	 Anton Vorontsov <cbouatmailru@gmail.com>
Subject: Re: [PATCH] power: supply: twl4030_charger: cancel workers via devm
Date: Sat, 25 Jul 2026 18:15:09 +0200	[thread overview]
Message-ID: <178499610950.774435.8676334469368857883.b4-ty@collabora.com> (raw)
In-Reply-To: <20260725072540.3092504-1-maoyixie.tju@gmail.com>


On Sat, 25 Jul 2026 15:25:40 +0800, Maoyi Xie wrote:
> bci is devm-allocated. Two workers (bci->work and bci->current_worker)
> dereference it. twl4030_bci_remove() disables charging and masks
> interrupts. It cancels neither worker. A worker pending at remove() can
> run after devm frees bci.
> 
> The USB transceiver comes from devm_usb_get_phy_by_node(). devm
> unregisters its notifier only after remove() returns. A cancel_work_sync()
> in remove() can then race a notifier reschedule. devm_work_autocancel()
> and devm_delayed_work_autocancel() avoid that. They cancel the workers
> during devm release, before bci is freed.
> 
> [...]

Applied, thanks!

[1/1] power: supply: twl4030_charger: cancel workers via devm
      commit: 6eba34732524067da2aad5ddfdfbc641ded10e9e

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


      reply	other threads:[~2026-07-25 16:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25  7:25 Maoyi Xie
2026-07-25 16:15 ` Sebastian Reichel [this message]

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=178499610950.774435.8676334469368857883.b4-ty@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=cbouatmailru@gmail.com \
    --cc=hns@goldelico.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maoyixie.tju@gmail.com \
    --cc=sre@kernel.org \
    --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®