Linux USB
 help / color / mirror / Atom feed
* [PATCH v2 0/4] usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator fixes
@ 2026-11-25 12:16 André Draszik
  2026-11-25 12:16 ` [PATCH v2 1/4] usb: typec: tcpm/tcpci_maxim: fix invalid wait context André Draszik
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: André Draszik @ 2026-11-25 12:16 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Badhri Jagan Sridharan
  Cc: Sebastian Andrzej Siewior, Clark Williams, Steven Rostedt,
	Peter Griffin, Tudor Ambarus, Juan Yescas, Amit Sunil Dhamne,
	kernel-team, linux-usb, linux-rt-devel, André Draszik,
	stable

Hi,

These four patches fix a lockdep invalid wait context splat, a
probe/unbind wakeup-event race, and two vbus regulator lifetime and
logging bugs in the Maxim 77759 TCPCI driver:

- Call pm_wakeup_event() from the threaded IRQ handler instead of the
  hard IRQ handler (the driver uses IRQF_ONESHOT, so the primary handler
  runs in hard IRQ context even on PREEMPT_RT).
- Initialise device wakeup before requesting the IRQ, so a pending alert
  or an interrupt during unbind cannot miss recording a wakeup event.
- Fix a vbus regulator use-after-free on driver unbind.
- Drop an irrelevant error message when VBUS sourcing is not requested.

Tested on Pixel 6 (Oriole) with CONFIG_PROVE_RAW_LOCK_NESTING=y enabled,
including tcpci_maxim module unload and reload cycles.

Cheers
Andre'

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v2:
- add patches for two more issues, a UAF and a spurious irrelevant
  warning
- collect Heikki's Acked-by on patches 1 and 2.
- rebase onto next-20261123.
- Link to v1: https://lore.kernel.org/r/20261123-max77759-wait-v1-0-6fa54a751bb7@linaro.org

---
André Draszik (4):
      usb: typec: tcpm/tcpci_maxim: fix invalid wait context
      usb: typec: tcpm/tcpci_maxim: init wakeup before irq
      usb: typec: tcpm/tcpci_maxim: fix vbus regulator UAF on unbind
      usb: typec: tcpm/tcpci_maxim: only complain about vbus when sourcing

 drivers/usb/typec/tcpm/tcpci_maxim_core.c | 62 +++++++++++++++++--------------
 1 file changed, 35 insertions(+), 27 deletions(-)
---
base-commit: 3191063649dbf7c0d0b768e1f3655e4c5fc6edb5
change-id: 20261123-max77759-wait-10974f4c312d

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>


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

end of thread, other threads:[~2026-11-25 12:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 12:16 [PATCH v2 0/4] usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator fixes André Draszik
2026-11-25 12:16 ` [PATCH v2 1/4] usb: typec: tcpm/tcpci_maxim: fix invalid wait context André Draszik
2026-11-25 12:16 ` [PATCH v2 2/4] usb: typec: tcpm/tcpci_maxim: init wakeup before irq André Draszik
2026-11-25 12:16 ` [PATCH v2 3/4] usb: typec: tcpm/tcpci_maxim: fix vbus regulator UAF on unbind André Draszik
2026-11-25 12:16 ` [PATCH v2 4/4] usb: typec: tcpm/tcpci_maxim: only complain about vbus when sourcing André Draszik
2026-11-25 12:21 ` [PATCH v2 0/4] usb: typec: tcpm/tcpci_maxim: lockdep, wakeup and vbus regulator fixes sashiko-bot

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