Re: [PATCH V4 02/14] i3c: Fix unlocked dereference of dev->desc in i3c_device_get_supported_xfer_mode()

[email protected] Thu, 06 Aug 2026 13:38:43 +0000
Newsgroups org.kernel.vger.linux-pci,org.infradead.lists.linux-i3c
Message-ID <[email protected]>
> i3c_device_get_supported_xfer_mode() uses dev->desc to obtain the
> master controller.  However, dev->desc must not be dereferenced unless
> bus->lock is held, and this function does not take that lock.
> 
> The function only needs access to the master controller associated with
> the device's bus.  Use dev->bus instead, which is always valid for the
> lifetime of the device and does not require dereferencing dev->desc.
> 
> Fixes: 256a21743d91 ("i3c: Add HDR API support")
> Cc: [email protected]
> Signed-off-by: Adrian Hunter <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=2