TencentOS-kernel/arch
Arvind Sankar b2bf2b3a51 efi/x86: Free efi_pgd with free_pages()
[ Upstream commit c2fe61d8be491ff8188edaf22e838f819999146b ]

Commit

  d9e9a6418065 ("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

    06ace26f4e6f ("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: d9e9a6418065 ("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>
2021-03-16 16:41:24 +08:00
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2021-03-16 16:34:34 +08:00
arc ARC: stack unwinding: avoid indefinite looping 2021-03-16 16:40:30 +08:00
arm ARM: dts: imx50-evk: Fix the chip select 1 IOMUX 2021-03-16 16:41:15 +08:00
arm64 arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point 2021-03-16 16:41:15 +08:00
c6x Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2021-03-16 16:28:56 +08:00
h8300 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
hexagon hexagon: define ioremap_uc 2021-03-16 16:27:29 +08:00
ia64 ia64: fix build error with !COREDUMP 2021-03-16 16:40:09 +08:00
m68k m68k: q40: Fix info-leak in rtc_ioctl 2021-03-16 16:36:33 +08:00
microblaze Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
mips MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu 2021-03-16 16:41:20 +08:00
nds32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
nios2 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
openrisc openrisc: Fix issue with get_user for 64-bit values 2021-03-16 16:39:36 +08:00
parisc kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables 2021-03-16 16:35:20 +08:00
powerpc powerpc/8xx: Always fault when _PAGE_ACCESSED is not set 2021-03-16 16:41:02 +08:00
riscv riscv: Set text_offset correctly for M-Mode 2021-03-16 16:40:47 +08:00
s390 s390/smp: move rcu_cpu_starting() earlier 2021-03-16 16:40:46 +08:00
sh sh: landisk: Add missing initialization of sh_io_port_base 2021-03-16 16:34:22 +08:00
sparc sparc64: remove mm_cpumask clearing to fix kthread_use_mm race 2021-03-16 16:39:40 +08:00
um um: change sigio_spinlock to a mutex 2021-03-16 16:39:41 +08:00
unicore32 Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
x86 efi/x86: Free efi_pgd with free_pages() 2021-03-16 16:41:24 +08:00
xtensa xtensa: fix system_call interaction with ptrace 2021-03-16 16:36:42 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig mm: fix exec activate_mm vs TLB shootdown and lazy tlb switching race 2021-03-16 16:39:40 +08:00