Re: [PATCH] bus: fsl_mc: Fix driver_managed_dma check

From: Christophe Leroy
Date: Sat May 17 2025 - 06:50:44 EST



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 <christophe.leroy@xxxxxxxxxx>