[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190528125805.2166-1-mail@lennart-glauer.de>
Date: Tue, 28 May 2019 14:58:05 +0200
From: Lennart Glauer <mail@...nart-glauer.de>
To: ard.biesheuvel@...aro.org, dvhart@...radead.org,
andy@...radead.org, tglx@...utronix.de, mingo@...hat.com,
bp@...en8.de, hpa@...or.com
Cc: x86@...nel.org, linux-efi@...r.kernel.org,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org,
Lennart Glauer <mail@...nart-glauer.de>
Subject: [PATCH] x86/efi: Free efi_pgd with free_pages()
This patch fixes another occurrence of free_page() that was missed
in 06ace26.
The efi_pgd is allocated as PGD_ALLOCATION_ORDER pages and therefore must
also be freed as PGD_ALLOCATION_ORDER pages with free_pages().
Signed-off-by: Lennart Glauer <mail@...nart-glauer.de>
---
arch/x86/platform/efi/efi_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 08ce8177c3af..acad22a44774 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -222,7 +222,7 @@ int __init efi_alloc_page_tables(void)
pgd = efi_pgd + pgd_index(EFI_VA_END);
p4d = p4d_alloc(&init_mm, pgd, EFI_VA_END);
if (!p4d) {
- free_page((unsigned long)efi_pgd);
+ free_pages((unsigned long)efi_pgd, PGD_ALLOCATION_ORDER);
return -ENOMEM;
}
--
2.17.1
Powered by blists - more mailing lists