All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] drivers/iommu/amd_iommu.c: argument page_size could be uninitialized
@ 2018-05-31 18:20 Yizhuo Zhai
  2018-06-01 15:42 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Yizhuo Zhai @ 2018-05-31 18:20 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Chengyu Song, Zhiyun Qian


[-- Attachment #1.1: Type: text/plain, Size: 838 bytes --]

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: yzhai003-3vSkeFsW7jA@public.gmane.org <yzhai003-3vSkeFsW7jA@public.gmane.org>
---
 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 *

[-- Attachment #1.2: Type: text/html, Size: 1766 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-01 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-31 18:20 [patch] drivers/iommu/amd_iommu.c: argument page_size could be uninitialized Yizhuo Zhai
2018-06-01 15:42 ` Joerg Roedel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.