[PATCH] iommu/arm-smmu-v3: Fix error check in arm_smmu_alloc_cd_tables

Pranjal Shrivastava praan at google.com
Fri Nov 7 11:30:28 PST 2025


On Fri, Nov 07, 2025 at 11:09:17AM -0800, Ryan Huang wrote:
> In arm_smmu_alloc_cd_tables(), the error check following the
> dma_alloc_coherent() for cd_table->l2.l1tab incorrectly tests
> cd_table->l2.l2ptrs.
> 
> This means an allocation failure for l1tab goes undetected, causing
> the function to return 0 (success) erroneously.
> 
> Correct the check to test cd_table->l2.l1tab.
> 
> Fixes: e3b1be2e73db ("iommu/arm-smmu-v3: Reorganize struct arm_smmu_ctx_desc_cfg")
> Signed-off-by: Daniel Mentz <danielmentz at google.com>
> Signed-off-by: Ryan Huang <tzukui at google.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Pranjal Shrivastava <praan at google.com>

Thanks for the fix!
-Praan



More information about the linux-arm-kernel mailing list