All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] driver core: parent lock fixes
@ 2026-10-14 13:31 Johan Hovold
  2026-10-14 13:31 ` [PATCH v2 1/3] driver core: fix parent lock use-after-free on USB disconnect Johan Hovold
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Johan Hovold @ 2026-10-14 13:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Johan Hovold
  Cc: Dmitry Torokhov, Alan Stern, Mario Peter, driver-core, linux-usb,
	linux-kernel

Mario Peter reported that USB interfaces may be probed without holding
the parent USB device lock during asynchronous and deferred probe.

This series addresses both cases, while fixing a long-standing
use-after-free issue with the parent lock implementation stemming from
the fact that the driver core does not necessarily hold a reference to
the parent device when taking its lock.

Johan


Changes in v2:
 - fix the parent lock UAF issue (new patch)
 - include my update of Mario's fix as it also depends on the UAF fix [1]


[1] https://lore.kernel.org/all/20261013140408.1226841-1-johan@kernel.org/


Johan Hovold (2):
  driver core: fix parent lock use-after-free on USB disconnect
  driver core: take parent lock on deferred probe

Mario Peter (1):
  driver core: take parent lock in async device attach

 drivers/base/base.h        |  1 +
 drivers/base/bus.c         | 32 +++++++++----
 drivers/base/dd.c          | 92 +++++++++++++++++++++-----------------
 drivers/usb/core/driver.c  |  1 -
 drivers/usb/core/message.c |  1 +
 include/linux/device.h     |  5 +++
 include/linux/device/bus.h |  3 --
 7 files changed, 81 insertions(+), 54 deletions(-)

-- 
2.55.0


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

end of thread, other threads:[~2026-10-14 14:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 13:31 [PATCH v2 0/3] driver core: parent lock fixes Johan Hovold
2026-10-14 13:31 ` [PATCH v2 1/3] driver core: fix parent lock use-after-free on USB disconnect Johan Hovold
2026-10-14 13:43   ` sashiko-bot
2026-10-14 14:49   ` Danilo Krummrich
2026-10-14 14:58     ` Alan Stern
2026-10-14 13:31 ` [PATCH v2 2/3] driver core: take parent lock on deferred probe Johan Hovold
2026-10-14 13:48   ` sashiko-bot
2026-10-14 13:31 ` [PATCH v2 3/3] driver core: take parent lock in async device attach Johan Hovold
2026-10-14 13:40   ` sashiko-bot
2026-10-14 14:52   ` Alan Stern
2026-10-14 14:58     ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.