android_kernel_motorola_sm6225/arch/x86/platform
Arvind Sankar b4013fde63 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:27:23 +01:00
..
atom x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
ce4100 x86/init: Remove i8042_detect() from platform ops 2016-12-19 11:34:15 +01:00
efi efi/x86: Free efi_pgd with free_pages() 2020-11-24 13:27:23 +01:00
geode x86/platform: Make platform/geode/net5501.c explicitly non-modular 2016-02-16 09:11:09 +01:00
goldfish x86/platform/goldfish: Prevent unconditional loading 2017-02-15 08:49:58 -08:00
intel x86/platform/intel/iosf_mbi: Add unlocked PMIC bus access notifier unregister 2017-11-10 13:14:02 +01:00
intel-mid x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
intel-quark x86/platform/quark: Re-use DEFINE_SHOW_ATTRIBUTE() macro 2018-02-16 10:10:14 +01:00
iris x86: platform: iris: drop owner assignment from platform_drivers 2014-10-20 16:20:15 +02:00
olpc x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC 2018-11-13 11:08:23 -08:00
scx200 X86: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
sfi x86: Cleanup irq_domain ops 2015-04-24 15:36:55 +02:00
ts5500 x86/platform: Delete extraneous MODULE_* tags fromm ts5500 2016-07-16 22:41:00 +02:00
uv irqdomain/treewide: Keep firmware node unconditionally allocated 2020-07-29 10:16:46 +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