iommu: amd: NULL value may be dereferenced
Subsystems (2)
PATCH 1/1 iommu: amd: NULL value may be dereferenced
Pointer 'dom' which was dereferenced at iommu.c:1993 is compared to NULL value at iommu.c:1998.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by Alexander Sapozhnikov <[email protected]>
--- drivers/iommu/amd/iommu.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/iommu/amd/iommu.c +3 -0
@@ -1985,6 +1985,9 @@ static void amd_iommu_domain_free(struct iommu_domain *dom) {struct protection_domain *domain; +if (!dom) +return ; + domain =to_pdomain (dom);if (domain->dev_cnt >0 )
Signature · 1 line
2.40.1