Skip to contentSkip to conversation

kho-warn-and-exit-when-unpreserved-page-wasnt-preserved.patch removed from -mm tree

merged mm-hotfixes-stable Andrew Morton 1 participant 1 message Nov 10, 2025 Stable branch

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kho: warn and exit when unpreserved page wasn't preserved
has been removed from the -mm tree. Its filename was
kho-warn-and-exit-when-unpreserved-page-wasnt-preserved.patch

This patch was dropped because it was merged into the mm-hotfixes-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Pratyush Yadav <[email protected]>
Subject: kho: warn and exit when unpreserved page wasn't preserved
Date: Mon, 3 Nov 2025 19:02:32 +0100

Calling __kho_unpreserve() on a pair of (pfn, end_pfn) that wasn't preserved is a bug. Currently, if that is done, the physxa or bits can be NULL. This results in a soft lockup since a NULL physxa or bits results in redoing the loop without ever making any progress.

Return when physxa or bits are not found, but WARN first to loudly indicate invalid behaviour.

Fixes fc33e4b44b27 ("kexec: enable KHO support for memory preservation")
Cc Alexander Graf <[email protected]>
Cc Baoquan He <[email protected]>
Cc Pasha Tatashin <[email protected]>

---

 kernel/kexec_handover.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/kexec_handover.c renamed from kernel/kexec_handover.c~kho-warn-and-exit-when-unpreserved-page-wasnt-preserved +4 -4
@@ -171,12 +171,12 @@ static void __kho_unpreserve(struct kho_
 		const unsigned long pfn_high = pfn >> order;
 
 		physxa = xa_load(&track->orders, order);
-		if (!physxa)
-			continue;
+		if (WARN_ON_ONCE(!physxa))
+			return;
 
 		bits = xa_load(&physxa->phys_bits, pfn_high / PRESERVE_BITS);
-		if (!bits)
-			continue;
+		if (WARN_ON_ONCE(!bits))
+			return;
 
 		clear_bit(pfn_high % PRESERVE_BITS, bits->preserve);
 

_

Patches currently in -mm which might be from [email protected] are

maintainers-add-myself-as-a-reviewer-for-kho.patch liveupdate-luo_file-add-private-argument-to-store-runtime-state.patch