Merge tag 'fixes-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux

Pull liveupdate fixes from Mike Rapoport:

 - avoid address translation in is_kho_boot() before the linear map is
   initialized, fixing early boot BUG_ONs on arm64

 - check for duplicate session names before growing the sessions
   preservations block set to avoid preserving an empty block that
   causes restoration to panic()

* tag 'fixes-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux:
  kho: check fdt_phys in is_kho_boot()
  liveupdate: check for duplicate session before growing block set
This commit is contained in:
Linus Torvalds
2026-11-15 08:55:09 -08:00
2 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -1643,7 +1643,7 @@ EXPORT_SYMBOL_GPL(kho_restore_free);
*/
bool is_kho_boot(void)
{
return !!kho_get_fdt();
return !!kho_in.fdt_phys;
}
EXPORT_SYMBOL_GPL(is_kho_boot);
+11 -10
View File
@@ -176,16 +176,6 @@ static int luo_session_insert(struct luo_session_header *sh,
guard(rwsem_write)(&sh->rwsem);
/*
* For outgoing we should make sure there is room in serialization array
* for new session.
*/
if (sh == &luo_session_global.outgoing) {
err = kho_block_set_grow(&sh->block_set, sh->count + 1);
if (err)
return err;
}
/*
* For small number of sessions this loop won't hurt performance
* but if we ever start using a lot of sessions, this might
@@ -196,6 +186,17 @@ static int luo_session_insert(struct luo_session_header *sh,
if (!strncmp(it->name, session->name, sizeof(it->name)))
return -EEXIST;
}
/*
* For outgoing we should make sure there is room in serialization array
* for new session.
*/
if (sh == &luo_session_global.outgoing) {
err = kho_block_set_grow(&sh->block_set, sh->count + 1);
if (err)
return err;
}
list_add_tail(&session->list, &sh->list);
sh->count++;