Skip to contentSkip to conversation

kho-kho_restore_vmalloc-fix-initialization-of-pages-array.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Nov 27, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kho: kho_restore_vmalloc: fix initialization of pages array
has been removed from the -mm tree. Its filename was
kho-kho_restore_vmalloc-fix-initialization-of-pages-array.patch

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

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: kho: kho_restore_vmalloc: fix initialization of pages array
Date: Tue, 25 Nov 2025 13:09:16 +0200

Patch series "kho: fixes for vmalloc restoration".

Pratyush reported off-list that when kho_restore_vmalloc() is used to restore a vmalloc_huge() allocation it hits VM_BUG_ON() when we reconstruct the struct pages in kho_restore_pages().

These patches fix the issue.

This patch (of 2):

In case a preserved vmalloc allocation was using huge pages, all pages in the array of pages added to vm_struct during kho_restore_vmalloc() are wrongly set to the same page.

Fix the indexing when assigning pages to that array.

---

 kernel/liveupdate/kexec_handover.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/liveupdate/kexec_handover.c renamed from kernel/liveupdate/kexec_handover.c~kho-kho_restore_vmalloc-fix-initialization-of-pages-array +1 -1
@@ -1096,7 +1096,7 @@ void *kho_restore_vmalloc(const struct k
 				goto err_free_pages_array;
 
 			for (int j = 0; j < contig_pages; j++)
-				pages[idx++] = page;
+				pages[idx++] = page + j;
 
 			phys += contig_pages * PAGE_SIZE;
 		}

_

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

maintainers-add-mike-rapoport-as-maintainer-for-userfaultfd.patch