[PATCH v1 2/4] iommu/arm-smmu-v3: Fix fwnode lookup lifetime handling

Jason Gunthorpe jgg at ziepe.ca
Wed Jul 15 12:37:32 PDT 2026


On Tue, Jul 14, 2026 at 02:09:28PM +0800, weimin xiong wrote:
> bus_find_device_by_fwnode() returns a device with its reference count
> incremented. arm_smmu_get_by_fwnode() drops that reference before
> reading the driver data, which leaves the returned pointer derived from
> a device after its reference has been released.
> 
> Read the driver data before put_device() and return NULL directly when
> the lookup fails.
> 
> Signed-off-by: weimin xiong <xiongwm2026 at 163.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Jason



More information about the linux-arm-kernel mailing list