45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
|
|
From 814378bd1174b4cb9f98e5ed0cac4f4d700c893d Mon Sep 17 00:00:00 2001
|
||
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
Date: Wed, 4 Sep 2024 08:25:49 +0000
|
||
|
|
Subject: [PATCH] hw/ppc: spapr: Use qemu_vfree() to free spapr->htab mainline
|
||
|
|
inclusion commit cb5b5ab9a516ce5ecddfc50971bf6f690300fd74 category: bugfix
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
---------------------------------------------------------------
|
||
|
|
|
||
|
|
spapr->htab is allocated by qemu_memalign(), hence we should use
|
||
|
|
qemu_vfree() to free it.
|
||
|
|
|
||
|
|
Fixes: c5f54f3e31bf ("pseries: Move hash page table allocation to reset time")
|
||
|
|
Fixes: b4db54132ffe ("target/ppc: Implement H_REGISTER_PROCESS_TABLE H_CALL"")
|
||
|
|
Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com>
|
||
|
|
Signed-off-by: Bin Meng <bin.meng@windriver.com>
|
||
|
|
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
|
||
|
|
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
||
|
|
Message-Id: <20220920103159.1865256-28-bmeng.cn@gmail.com>
|
||
|
|
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
|
||
|
|
|
||
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
||
|
|
---
|
||
|
|
hw/ppc/spapr.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
|
||
|
|
index d1fbea16e3..6727ea7118 100644
|
||
|
|
--- a/hw/ppc/spapr.c
|
||
|
|
+++ b/hw/ppc/spapr.c
|
||
|
|
@@ -1482,7 +1482,7 @@ int spapr_hpt_shift_for_ramsize(uint64_t ramsize)
|
||
|
|
|
||
|
|
void spapr_free_hpt(SpaprMachineState *spapr)
|
||
|
|
{
|
||
|
|
- g_free(spapr->htab);
|
||
|
|
+ qemu_vfree(spapr->htab);
|
||
|
|
spapr->htab = NULL;
|
||
|
|
spapr->htab_shift = 0;
|
||
|
|
close_htab_fd(spapr);
|
||
|
|
--
|
||
|
|
2.41.0.windows.1
|
||
|
|
|