diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-15 08:55:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-15 08:55:09 -0800 |
| commit | 04da1a14b9eae1dbc2ccc007b54f46771f9cb529 (patch) | |
| tree | 66bc298c4c6ec73b40d71fb11418538bc239b518 | |
| parent | bfac855a820c3a32219779e4fb44804e8f81977d (diff) | |
| parent | 58c5852ca96c58cdfdb9646870b217fc54d06a97 (diff) | |
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
| -rw-r--r-- | kernel/liveupdate/kexec_handover.c | 2 | ||||
| -rw-r--r-- | kernel/liveupdate/luo_session.c | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c index 6f1f55fe3181..42c6609a1766 100644 --- a/kernel/liveupdate/kexec_handover.c +++ b/kernel/liveupdate/kexec_handover.c @@ -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); diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c index f48e9a4185f9..74bc66929f4b 100644 --- a/kernel/liveupdate/luo_session.c +++ b/kernel/liveupdate/luo_session.c @@ -177,16 +177,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 * become a bottle neck during deserialization time, as it would @@ -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++; |
