Re: [PATCH v3] iommu/riscv: prevent NULL deref in iova_to_phys
From: Markus Elfring
Date: Fri Aug 15 2025 - 05:10:22 EST
…> riscv_iommu_iova_to_phys() failed to handle NULL returns. Fix by adding NULL
> check before dereferencing and returning 0 for invalid iova.
…> ---
> Changes
> v3:
> - Remove redundant pte validation in riscv_iommu_iova_to_phys
> - Improve subject line to emphasize prevention
…
Repetition:
https://lore.kernel.org/lkml/effb29be-6d14-47e5-ab71-454119467750@xxxxxx/
Would a summary phrase like “Prevent null pointer dereference in riscv_iommu_iova_to_phys()”
be nicer anyhow?
Regards,
Markus