[PATCH v4] iommu/riscv: prevent NULL deref in iova_to_phys
XianLiang Huang
huangxianliang at lanxincomputing.com
Wed Aug 20 02:21:28 PDT 2025
https://lore.kernel.org/lkml/feb46658-5a3a-4403-b407-500566280eb3@web.de/
I updated the patch in v3, and updated change description accordingly:
In v1
> - if (_io_pte_none(*ptr) || !_io_pte_present(*ptr))
> + if (!ptr || _io_pte_none(*ptr) || !_io_pte_present(*ptr))
In v3
> - if (_io_pte_none(*ptr) || !_io_pte_present(*ptr))
> + if (!ptr)
but put your proposal at the patch Subject...
v1: check pte null pointer before use
v3: prevent NULL deref in iova_to_phys
> …> ---
> > Changes
> > v4:
> > - Change the summary as Markus recommends
> >
> > v3:
sorry for making this messy.
Regards,
Xianliang
More information about the linux-riscv
mailing list