Re: [PATCH 3/7] iommu/arm-smmu-v3-iommufd: Fix error path in arm_vsmmu_cache_invalidate()
From: Jason Gunthorpe
Date: Fri Aug 28 2026 - 10:27:42 EST
> arm_vsmmu_cache_invalidate() issues commands in batch size.
> However, if arm_vsmmu_convert_user_cmd() fails, it will return to the
> user that it processed "cur - cmds" which may be part of a batch not
> issued yet.
>
> Fix this by calculating the returned entry_num solely based on the
> "last" that tracks the last batch that was successfully issued.
>
> Also, fix the number of commands for early failing condition.
>
> Fixes: d68beb276ba2 ("iommu/arm-smmu-v3: Support IOMMU_HWPT_INVALIDATE using a VIOMMU object")
> Reported-by: Sashiko <>
> Signed-off-by: Mostafa Saleh <smostafa@xxxxxxxxxx>
Nicolin's series fixes this and the other sashiko note about over
allocation:
https://lore.kernel.org/all/cover.1785258826.git.nicolinc@xxxxxxxxxx/
I think it is in good shape, I would rather merge it than hack on this
further.
--
Jason