projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
021c917
)
iommu/amd: Argument page_size could be uninitialized
author
yzhai003@ucr.edu
<yzhai003@ucr.edu>
Fri, 1 Jun 2018 18:30:14 +0000
(11:30 -0700)
committer
Joerg Roedel
<jroedel@suse.de>
Fri, 6 Jul 2018 11:18:11 +0000
(13:18 +0200)
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@ucr.edu <yzhai003@ucr.edu>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/amd_iommu.c
b/drivers/iommu/amd_iommu.c
index 596b95c50051dcb75adb67496579af4b501d0ace..e688169721b880e071ba431b0f0bb774d337ba66 100644
(file)
--- a/
drivers/iommu/amd_iommu.c
+++ b/
drivers/iommu/amd_iommu.c
@@
-1404,6
+1404,8
@@
static u64 *fetch_pte(struct protection_domain *domain,
int level;
u64 *pte;
+ *page_size = 0;
+
if (address > PM_LEVEL_SIZE(domain->mode))
return NULL;