mirror-linux/kernel/liveupdate
Mike Rapoport (Microsoft) 4bc84cd539 kho: kho_restore_vmalloc: fix initialization of pages array
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.

Link: https://lkml.kernel.org/r/20251125110917.843744-1-rppt@kernel.org
Link: https://lkml.kernel.org/r/20251125110917.843744-2-rppt@kernel.org
Fixes: a667300bd5 ("kho: add support for preserving vmalloc allocations")
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-11-27 14:24:44 -08:00
..
Kconfig liveupdate: luo_core: Live Update Orchestrator 2025-11-27 14:24:37 -08:00
Makefile liveupdate: luo_file: implement file systems callbacks 2025-11-27 14:24:38 -08:00
kexec_handover.c kho: kho_restore_vmalloc: fix initialization of pages array 2025-11-27 14:24:44 -08:00
kexec_handover_debug.c
kexec_handover_debugfs.c kho: remove abort functionality and support state refresh 2025-11-27 14:24:36 -08:00
kexec_handover_internal.h kho: remove abort functionality and support state refresh 2025-11-27 14:24:36 -08:00
luo_core.c liveupdate: luo_core: add user interface 2025-11-27 14:24:38 -08:00
luo_file.c liveupdate: luo_file: add private argument to store runtime state 2025-11-27 14:24:40 -08:00
luo_internal.h liveupdate: luo_file: implement file systems callbacks 2025-11-27 14:24:38 -08:00
luo_session.c liveupdate: luo_session: add ioctls for file preservation 2025-11-27 14:24:39 -08:00