Re: [PATCH 2/7] iommu/arm-smmu-v3: Prevent rbtree corruption from duplicate streams

From: Jason Gunthorpe

Date: Fri Aug 28 2026 - 10:29:07 EST


On Fri, 28 Aug 2026 12:53:37 +0000, Mostafa Saleh <smostafa@xxxxxxxxxx> wrote:
> In handling PCI devices with duplicate IDs, arm_smmu_insert_master()
> will continue the loop skipping the duplicate sids insertion in the
> rbtree.
> However, in the error path of arm_smmu_insert_master() and in
> arm_smmu_remove_master(), the code loops over all fwspec->num_ids and
> calls rb_erase() unconditionally.
>
> [...]

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

--
Jason