Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/2] extcon: synchronize all-connector removal and fix Lenovo fastcharger teardown
@ 2026-11-15 11:47 Hongyan Xu
  2026-11-15 11:47 ` [PATCH v2 1/2] extcon: synchronize all-connector notifier removal Hongyan Xu
  2026-11-15 11:47 ` [PATCH v2 2/2] platform/x86: lenovo: cancel fastcharger work on detach Hongyan Xu
  0 siblings, 2 replies; 4+ messages in thread
From: Hongyan Xu @ 2026-11-15 11:47 UTC (permalink / raw)
  To: Ilpo J鐩瞨vinen, Hans de Goede
  Cc: MyungJoo Ham, Chanwoo Choi, Derek J. Clark, Mark Pearson,
	Rong Zhang, platform-driver-x86, linux-kernel, stable

The Lenovo Yoga Tab 2 fastcharger driver releases managed serdev,
pinctrl and GPIO resources while its extcon callback can still publish
work.  Ordering the devres actions alone is not enough because the
all-connector raw notifier does not wait for an in-flight callback.

Patch 1 converts only the all-connector notifier chain to an atomic
chain so unregister waits for callbacks and is safe from interrupt
context.  The per-ID chains stay raw because some current callbacks
perform sleeping regulator operations.  Patch 2 then installs the
managed work cancellation before the notifier, so reverse devres order
stops the producer before releasing the resources it uses.


Hongyan Xu (2):
  extcon: synchronize all-connector notifier removal
  platform/x86: lenovo: cancel fastcharger work on detach

 Documentation/driver-api/extcon.rst           |  2 +-
 drivers/extcon/extcon.c                       | 28 ++++++-------------
 drivers/extcon/extcon.h                       |  2 +-
 .../lenovo/yoga-tab2-pro-1380-fastcharger.c   |  6 +++-
 include/linux/extcon.h                        |  4 +++
 5 files changed, 20 insertions(+), 22 deletions(-)

-- 
2.50.1.windows.1

Discovery: found by the author's in-house static analysis tool.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-16 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 11:47 [PATCH v2 0/2] extcon: synchronize all-connector removal and fix Lenovo fastcharger teardown Hongyan Xu
2026-11-15 11:47 ` [PATCH v2 1/2] extcon: synchronize all-connector notifier removal Hongyan Xu
2026-11-16 11:28   ` Ilpo Järvinen
2026-11-15 11:47 ` [PATCH v2 2/2] platform/x86: lenovo: cancel fastcharger work on detach Hongyan Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox