Re: [PATCH] bus: fsl_mc: Fix driver_managed_dma check
From: Christophe Leroy <hidden>
Date: 2025-05-17 10:50:33
Also in:
linux-iommu, lkml
From: Christophe Leroy <hidden>
Date: 2025-05-17 10:50:33
Also in:
linux-iommu, lkml
On Fri, 25 Apr 2025 14:39:28 +0100, Robin Murphy wrote:
Since it's not currently safe to take device_lock() in the IOMMU probe path, that can race against really_probe() setting dev->driver before attempting to bind. The race itself isn't so bad, since we're only concerned with dereferencing dev->driver itself anyway, but sadly my attempt to implement the check with minimal churn leads to a kind of TOCTOU issue, where dev->driver becomes valid after to_fsl_mc_driver(NULL) is already computed, and thus the check fails to work as intended. [...]
Applied, thanks!
[1/1] bus: fsl_mc: Fix driver_managed_dma check
commit: 152f33ee30ee6a7f4c15bedd7529dc5945315547
Best regards,
--
Christophe Leroy [off-list ref]