1
0
Fork 0
alistair23-linux/arch/x86/platform
Arvind Sankar 9d1b5a8c72 efi/x86: Free efi_pgd with free_pages()
[ Upstream commit c2fe61d8be ]

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
..
atom Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
ce4100 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
efi efi/x86: Free efi_pgd with free_pages() 2020-11-24 13:29:19 +01:00
geode Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 17:49:45 -07:00
goldfish treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
intel x86/platform/intel/iosf_mbi Rewrite locking 2019-08-19 20:52:39 +02:00
intel-mid treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
intel-quark x86: platform: no need to check return value of debugfs_create functions 2019-06-03 16:18:12 +02:00
iris treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 70 2019-05-24 17:36:47 +02:00
olpc olpc: x01: convert platform driver to use dev_groups 2019-08-02 13:23:14 +02:00
pvh docs: fix broken documentation links 2019-06-08 13:42:13 -06:00
scx200 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
sfi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335 2019-06-05 17:37:06 +02:00
ts5500 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
uv irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:18:28 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00