public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] USB: lpc32xx: fix error handling
@ 2025-12-18 15:35 Johan Hovold
  2025-12-18 15:35 ` [PATCH v2 1/5] usb: gadget: lpc32xx_udc: fix clock imbalance in error path Johan Hovold
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Johan Hovold @ 2025-12-18 15:35 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Vladimir Zapolskiy, Piotr Wojtaszczyk, Alan Stern, Ma Ke,
	linux-usb, linux-kernel, Johan Hovold

A recent change fixing a device reference leak introduced a clock
imbalance by reusing an error path so that the clock may be disabled
before having been enabled.

The very same change could also lead to a use-after-free in case the
driver is used with non-OF probing.

This series fixes the resulting mess as well as the related device leak
in the NXP OHCI driver.

Included are also two related cleanups.

Johan


Changes in v2:
 - defer an ohci error label rename to the clean up patch


Johan Hovold (5):
  usb: gadget: lpc32xx_udc: fix clock imbalance in error path
  usb: phy: isp1301: fix non-OF device reference imbalance
  usb: ohci-nxp: fix device leak on probe failure
  usb: gadget: lpc32xx_udc: clean up probe error labels
  usb: ohci-nxp: clean up probe error labels

 drivers/usb/gadget/udc/lpc32xx_udc.c | 41 ++++++++++++++--------------
 drivers/usb/host/ohci-nxp.c          | 18 ++++++------
 drivers/usb/phy/phy-isp1301.c        |  7 ++++-
 3 files changed, 36 insertions(+), 30 deletions(-)

-- 
2.51.2


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

end of thread, other threads:[~2025-12-19  6:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 15:35 [PATCH v2 0/5] USB: lpc32xx: fix error handling Johan Hovold
2025-12-18 15:35 ` [PATCH v2 1/5] usb: gadget: lpc32xx_udc: fix clock imbalance in error path Johan Hovold
2025-12-19  0:11   ` Vladimir Zapolskiy
2025-12-18 15:35 ` [PATCH v2 2/5] usb: phy: isp1301: fix non-OF device reference imbalance Johan Hovold
2025-12-19  0:15   ` Vladimir Zapolskiy
2025-12-19  6:20     ` Johan Hovold
2025-12-18 15:35 ` [PATCH v2 3/5] usb: ohci-nxp: fix device leak on probe failure Johan Hovold
2025-12-18 15:52   ` Alan Stern
2025-12-19  0:19   ` Vladimir Zapolskiy
2025-12-18 15:35 ` [PATCH v2 4/5] usb: gadget: lpc32xx_udc: clean up probe error labels Johan Hovold
2025-12-19  0:22   ` Vladimir Zapolskiy
2025-12-18 15:35 ` [PATCH v2 5/5] usb: ohci-nxp: " Johan Hovold
2025-12-19  0:22   ` Vladimir Zapolskiy

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