Re: [PATCH] x86/mm/ident_map: Check for errors from ident_pud_init()

From: Joerg Roedel
Date: Wed Oct 28 2020 - 18:36:31 EST


On Tue, Oct 27, 2020 at 07:06:48PM -0400, Arvind Sankar wrote:
> Commit
> ea3b5e60ce80 ("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.
>
> Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> Fixes: ea3b5e60ce80 ("x86/mm/ident_map: Add 5-level paging support")
> ---
> arch/x86/mm/ident_map.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Joerg Roedel <jroedel@xxxxxxx>