[PATCH v2 1/7] kho: Reclaim the metadata page left reserved after kexec
From: Chris Down
Date: Sat Nov 28 2026 - 13:27:42 EST
After a KHO kexec, the new kernel keeps the page holding the previous
kernel's kexec metadata reserved for as long as it runs. It only needs
the page once, since kho_in_kexec_metadata() copies the previous release
and the kexec count out of it at boot, and nothing reads it again.
Free it with kho_restore_free() once copying is complete.
Tested-by: Breno Leitao <leitao@xxxxxxxxxx>
Reviewed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Signed-off-by: Chris Down <chris@xxxxxxxxxxxxxx>
---
kernel/liveupdate/kexec_handover.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index 38e65d210cb9..233c126f6352 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -1814,6 +1814,8 @@ static void __init kho_in_kexec_metadata(void)
pr_info("exec from: %s (count %u)\n",
kho_in.previous_release, kho_in.kexec_count);
+
+ kho_restore_free(metadata);
}
/*
--
2.56.1