Re: [PATCH] iommu/tegra241-cmdqv: Skip CMD_SYNC flush during remove
From: Jason Gunthorpe
Date: Fri May 29 2026 - 07:53:44 EST
On Fri, May 29, 2026 at 10:10:52AM +0100, Shameer Kolothum wrote:
> @@ -789,6 +794,13 @@ static void tegra241_cmdqv_remove(struct arm_smmu_device *smmu)
> container_of(smmu, struct tegra241_cmdqv, smmu);
> u16 idx;
>
> + /*
> + * tegra241_cmdqv_remove() is added to devres at the very beginning. So,
> + * at this point, devres has already freed the SMMU resources that this
> + * path must not access to avoid a UAF.
> + */
> + cmdqv->removing = true;
Please don't add random bools to avoid devm bugs. Just don't use devm,
or maybe fix the devm ordering.. These ordering bugs are a well known
problem with using devm :(
Jason