Skip to content

Commit 06ace26

Browse files
Waiman-LongKAGA-KOKO
authored andcommitted
x86/efi: Free efi_pgd with free_pages()
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 <longman@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1521746333-19593-1-git-send-email-longman@redhat.com
1 parent 31ad7f8 commit 06ace26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/platform/efi/efi_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ int __init efi_alloc_page_tables(void)
227227
if (!pud) {
228228
if (CONFIG_PGTABLE_LEVELS > 4)
229229
free_page((unsigned long) pgd_page_vaddr(*pgd));
230-
free_page((unsigned long)efi_pgd);
230+
free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
231231
return -ENOMEM;
232232
}
233233

0 commit comments

Comments
 (0)