Skip to content

Commit

Permalink
x86/efi: Free efi_pgd with free_pages()
Browse files Browse the repository at this point in the history
The efi_pgd is allocated as PGD_ALLOCATION_ORDER pages and therefore must
also be freed as PGD_ALLOCATION_ORDER pages with free_pages().

Fixes: d9e9a64 ("x86/mm/pti: Allocate a separate user PGD")
Signed-off-by: Waiman Long <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: Dave Hansen <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
Waiman-Long authored and KAGA-KOKO committed Mar 23, 2018
1 parent 31ad7f8 commit 06ace26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/platform/efi/efi_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int __init efi_alloc_page_tables(void)
if (!pud) {
if (CONFIG_PGTABLE_LEVELS > 4)
free_page((unsigned long) pgd_page_vaddr(*pgd));
free_page((unsigned long)efi_pgd);
free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
return -ENOMEM;
}

Expand Down

0 comments on commit 06ace26

Please sign in to comment.