linux-brain/arch/x86/platform/efi
Arvind Sankar 9d1b5a8c72 efi/x86: Free efi_pgd with free_pages()
[ Upstream commit c2fe61d8be491ff8188edaf22e838f819999146b ]

Commit

  d9e9a64180 ("x86/mm/pti: Allocate a separate user PGD")

changed the PGD allocation to allocate PGD_ALLOCATION_ORDER pages, so in
the error path it should be freed using free_pages() rather than
free_page().

Commit

    06ace26f4e ("x86/efi: Free efi_pgd with free_pages()")

fixed one instance of this, but missed another.

Move the freeing out-of-line to avoid code duplication and fix this bug.

Fixes: d9e9a64180 ("x86/mm/pti: Allocate a separate user PGD")
Link: https://lore.kernel.org/r/20201110163919.1134431-1-nivedita@alum.mit.edu
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-24 13:29:19 +01:00
..
efi_32.c x86/efi: Load fixmap GDT in efi_call_phys_epilog() before setting %cr3 2018-09-12 21:53:34 +02:00
efi_64.c efi/x86: Free efi_pgd with free_pages() 2020-11-24 13:29:19 +01:00
efi_stub_32.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi_stub_64.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
efi_thunk_64.S x86/efi: Use efi_switch_mm() rather than manually twiddling with %cr3 2018-03-12 11:05:05 +01:00
efi.c efi/x86: Add TPM related EFI tables to unencrypted mapping checks 2020-04-17 10:50:10 +02:00
Makefile efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation 2019-02-04 08:27:30 +01:00
quirks.c x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage 2020-01-12 12:21:15 +01:00