Re: [PATCH] iommupt: Always add IOVA range to iotlb_gather in gather_range_pages()
From: Jason Gunthorpe
Date: Mon Feb 02 2026 - 11:09:44 EST
On Mon, Feb 02, 2026 at 05:54:58PM +0800, Yu Zhang wrote:
> diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h
> index d575f3ba9d34..3e33fe64feab 100644
> --- a/drivers/iommu/generic_pt/iommu_pt.h
> +++ b/drivers/iommu/generic_pt/iommu_pt.h
> @@ -58,10 +58,9 @@ static void gather_range_pages(struct iommu_iotlb_gather *iotlb_gather,
> * Note that the sync frees the gather's free list, so we must
> * not have any pages on that list that are covered by iova/len
> */
> - } else if (pt_feature(common, PT_FEAT_FLUSH_RANGE)) {
> - iommu_iotlb_gather_add_range(iotlb_gather, iova, len);
> }
>
> + iommu_iotlb_gather_add_range(iotlb_gather, iova, len);
> iommu_pages_list_splice(free_list, &iotlb_gather->freelist);
> }
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
This should have a
Cc: stable@xxxxxxxxxxxxxxx
It is a serious error.
Thanks,
Jason