Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 373eac79 authored by Arvind Sankar's avatar Arvind Sankar Committed by Greg Kroah-Hartman
Browse files

x86/mm/ident_map: Check for errors from ident_pud_init()



[ Upstream commit 1fcd009102ee02e217f2e7635ab65517d785da8e ]

Commit

  ea3b5e60 ("x86/mm/ident_map: Add 5-level paging support")

added ident_p4d_init() to support 5-level paging, but this function
doesn't check and return errors from ident_pud_init().

For example, the decompressor stub uses this code to create an identity
mapping. If it runs out of pages while trying to allocate a PMD
pagetable, the error will be currently ignored.

Fix this to propagate errors.

 [ bp: Space out statements for better readability. ]

Fixes: ea3b5e60 ("x86/mm/ident_map: Add 5-level paging support")
Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarJoerg Roedel <jroedel@suse.de>
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lkml.kernel.org/r/20201027230648.1885111-1-nivedita@alum.mit.edu


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e02d63b0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment