Skip to content
Commit 95deee37 authored by Will McVicker's avatar Will McVicker Committed by Greg Kroah-Hartman
Browse files

platform: Fix race condition during DMA configure at IOMMU probe time



To avoid a race between the IOMMU probing thread and the device driver
async probing thread during configuration of the platform DMA, update
`platform_dma_configure()` to read `dev->driver` once and test if it's
NULL before using it. This ensures that we don't de-reference an invalid
platform driver pointer if the device driver is asynchronously bound
while configuring the DMA.

Fixes: bcb81ac6 ("iommu: Get DT/ACPI parsing into the proper probe path")
Signed-off-by: default avatarWill McVicker <willmcvicker@google.com>
Reviewed-by: Robin Murphy's avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20250424180420.3928523-1-willmcvicker@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4432656
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment