[PATCH v3] iommu/riscv: prevent NULL deref in iova_to_phys

Markus Elfring Markus.Elfring at web.de
Fri Aug 15 02:03:24 PDT 2025


…> 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@web.de/

Would a summary phrase like “Prevent null pointer dereference in riscv_iommu_iova_to_phys()”
be nicer anyhow?

Regards,
Markus



More information about the linux-riscv mailing list