Re: [PATCH v2 1/3] driver core: fix parent lock use-after-free on USB disconnect

From: Danilo Krummrich

Date: Wed Oct 14 2026 - 11:29:52 EST


On Wed Oct 14, 2026 at 3:31 PM CEST, Johan Hovold wrote:
> + * @need_parent_lock: When probing or removing a device of this type,
> + * driver core should lock the device's parent. Note that
> + * the device must hold a reference to its parent.

For the reasons described in [1], I object to making subsystems responsible for
the parent reference needed by driver core's delayed accesses. The driver core
should acquire and release that reference internally.

[1] https://lore.kernel.org/driver-core/DM4N25JXKTQM.3K7TP9HM68KQ2@xxxxxxxxxx/