Re: [PATCH v3 06/14] iommu/mediatek: fix use-after-free on probe deferral

From: Yong Wu (吴勇)
Date: Sat Oct 25 2025 - 05:19:10 EST


On Mon, 2025-10-20 at 06:53 +0200, Johan Hovold wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> The driver is dropping the references taken to the larb devices
> during
> probe after successful lookup as well as on errors. This can
> potentially lead to a use-after-free in case a larb device has not
> yet
> been bound to its driver so that the iommu driver probe defers.
>
> Fix this by keeping the references as expected while the iommu driver
> is
> bound.
>
> Fixes: 26593928564c ("iommu/mediatek: Add error path for loop of
> mm_dts_parse")
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Yong Wu <yong.wu@xxxxxxxxxxxx>
> Acked-by: Robin Murphy <robin.murphy@xxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
> ---

Reviewed-by: Yong Wu <yong.wu@xxxxxxxxxxxx>