Variable "unmap_size" is supposed to be initialized in function fetch_pte. However, it's uninitialized if fetch_pte returns NULL. And "unmap_size" is used outside the return check.
>From 377ccb647d3c6c6747f20a242b035bafc775c3be Mon Sep 17 00:00:00 2001 Signed-off-by: From: "[email protected]" <[email protected]> --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index 8fb8c73..774e057 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1500,7 +1500,7 @@ static unsigned long iommu_unmap_page(struct protection_domain *dom, unsigned long page_size) { unsigned long long unmapped; - unsigned long unmap_size; + unsigned long unmap_size = 0; u64 *pte; BUG_ON(!is_power_of_2(page_size)); -- 2.7.4 -- Kind Regards, *Yizhuo Zhai* *Computer Science, Graduate Student* *University of California, Riverside *
_______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
