Re: [PATCH] iommu/msm: limit the per-master Machine ID list

From: Dmitry Baryshkov

Date: Wed Jul 22 2026 - 02:26:07 EST


On Wed, Jul 22, 2026 at 12:16:19PM +0800, Pengpeng Hou wrote:
> The OF translation path appends each unique stream ID from an IOMMU
> specifier to the fixed mids array in the per-master object. It currently
> has no capacity check before storing at mids[num_mids] and incrementing
> num_mids.
>
> Return -ENOSPC when the array is full rather than writing the next ID
> beyond it.
>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>
> ---
> drivers/iommu/msm_iommu.c | 3 +++
> 1 file changed, 3 insertions(+)
>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>


--
With best wishes
Dmitry