Re: [PATCH v2 0/2] kho: fixes for kho_init() failures

From: Mike Rapoport

Date: Sun Nov 29 2026 - 14:36:07 EST


From: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

On Sat, 28 Nov 2026 01:21:46 -0800, Chris Down wrote:
> When kho_init() fails on a KHO boot, its error path frees the bootmem
> areas that were inherited from the previous kernel, even though the
> running kernel was loaded into them and is still using them. The new
> kernel then oopses in kho_init() and panics.
>
> The easiest way to get there turned out to be debugfs=off. With
> CONFIG_KEXEC_HANDOVER_DEBUGFS=y, kho_init() fails when it can't create
> its debugfs entries, so a KHO kexec into a kernel with debugfs disabled
> is enough to hit the panic. That's a bug in its own right, because it
> means KHO and LUO can't be used at all on a kernel that has debugfs
> disabled, although nothing in KHO needs debugfs any more.
>
> [...]

Applied to next branch of liveupdate/linux.git tree, thanks!

[1/2] kho: don't release incoming bootmem areas when kho_init() fails
commit: 0e88c65680e2d0afd0abc557d138aed52ed43593
[2/2] kho: don't fail kho_init() when debugfs is disabled
commit: 5b8a3f8fc1e81bf5ae4c77e8b644a5e6883466a0

tree: https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux
branch: next

--
Sincerely yours,
Mike.