From: Waiman Long <longman@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org, linux-efi@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Waiman Long <longman@redhat.com>
Subject: [PATCH] x86/efi: Free efi_pgd with free_pages()
Date: Thu, 22 Mar 2018 15:18:53 -0400
Message-ID: <1521746333-19593-1-git-send-email-longman@redhat.com> (raw)
The efi_pgd is allocated as PGD_ALLOCATION_ORDER pages and so should
also be freed as PGD_ALLOCATION_ORDER pages with free_pages().
Fixes: d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD")
Signed-off-by: Waiman Long <longman@redhat.com>
---
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 c310a82..f9cfbc0 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -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;
}
--
1.8.3.1
next reply index
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 19:18 Waiman Long [this message]
2019-05-28 12:58 Lennart Glauer
2019-05-28 13:09 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1521746333-19593-1-git-send-email-longman@redhat.com \
--to=longman@redhat.com \
--cc=ard.biesheuvel@linaro.org \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Linux-EFI Archive on lore.kernel.org
Archives are clonable:
git clone --mirror https://lore.kernel.org/linux-efi/0 linux-efi/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-efi linux-efi/ https://lore.kernel.org/linux-efi \
linux-efi@vger.kernel.org
public-inbox-index linux-efi
Example config snippet for mirrors
Newsgroup available over NNTP:
nntp://nntp.lore.kernel.org/org.kernel.vger.linux-efi
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git