Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5806df9 authored by Tejun Heo's avatar Tejun Heo
Browse files

x86: fix duplicate free in setup_pcpu_remap() failure path



In the failure path, setup_pcpu_remap() tries to free the area which
has already been freed to make holes in the large page.  Fix it.

[ Impact: fix duplicate free in failure path ]

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
parent 85ae87c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ static ssize_t __init setup_pcpu_remap(size_t static_size)
enomem:
	for_each_possible_cpu(cpu)
		if (pcpur_ptrs[cpu])
			free_bootmem(__pa(pcpur_ptrs[cpu]), PMD_SIZE);
			free_bootmem(__pa(pcpur_ptrs[cpu]), pcpur_size);
	ret = -ENOMEM;
out_free_ar:
	free_bootmem(__pa(pcpur_ptrs), ptrs_size);