mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
iommu/amd: Argument page_size could be uninitialized
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>
This commit is contained in:
parent
021c91791a
commit
4674686d6c
1 changed files with 2 additions and 0 deletions
|
@ -1404,6 +1404,8 @@ static u64 *fetch_pte(struct protection_domain *domain,
|
||||||
int level;
|
int level;
|
||||||
u64 *pte;
|
u64 *pte;
|
||||||
|
|
||||||
|
*page_size = 0;
|
||||||
|
|
||||||
if (address > PM_LEVEL_SIZE(domain->mode))
|
if (address > PM_LEVEL_SIZE(domain->mode))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue