[PW_SID:991816] [v3] iommu/riscv: prevent NULL deref in iova_to_phys - #780
[PW_SID:991816] [v3] iommu/riscv: prevent NULL deref in iova_to_phys#780linux-riscv-bot wants to merge 1 commit into
Conversation
The riscv_iommu_pte_fetch() function returns either NULL for unmapped/never-mapped iova, or a valid leaf pte pointer that requires no further validation. riscv_iommu_iova_to_phys() failed to handle NULL returns. Fix by adding NULL check before dereferencing and returning 0 for invalid iova. Fixes: 488ffbf ("iommu/riscv: Paging domain support") Cc: Tomasz Jeznach <tjeznach@rivosinc.com> Signed-off-by: XianLiang Huang <huangxianliang@lanxincomputing.com> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
|
Patch 1: "[v3] iommu/riscv: prevent NULL deref in iova_to_phys" |
PR for series 991816 applied to workflow__riscv__fixes
Name: [v3] iommu/riscv: prevent NULL deref in iova_to_phys
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=991816
Version: 3