[PATCH v2 0/2] extcon: synchronize all-connector removal and fix Lenovo fastcharger teardown
From: Hongyan Xu
Date: Sun Nov 15 2026 - 06:48:19 EST
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.