Argument "page_size" passing to function "fetch_pte" could be uninitialized
if the function returns NULL. The caller "iommu_unmap_page" checks the
return value but the page_size is used outside the if block.

Signed-off-by: [email protected] <[email protected]>
---
 drivers/iommu/amd_iommu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 774e057..3a23e97 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1397,6 +1397,7 @@ static u64 *fetch_pte(struct protection_domain
*domain,
 {
  int level;
  u64 *pte;
+ *page_size = 0;

  if (address > PM_LEVEL_SIZE(domain->mode))
  return NULL;
-- 
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

Reply via email to