[PATCH v2 0/3] liveupdate: serialization safety and race fixes
Pasha Tatashin
pasha.tatashin at soleen.com
Wed May 6 11:20:40 PDT 2026
This series addresses several issues related to the synchronization
between the reboot process and LUO session management.
Changes in v2:
- Added a patch to skip KHO data for context-preserving kexec (suggested
by Pratyush Yadav).
- Dropped the 'rebooting' flag and manual session pinning patches from
v1.
- Implemented a locking approach in luo_session_serialize() to prevent
concurrent session mutations and release (suggested by Pratyush).
1. Skip KHO data for context-preserving kexec: A preserve_context kexec
returns to the current kernel, which means the 2nd kernel does not use
KHO data. Passing KHO data via setup_data or devicetree is unnecessary.
2. Skip LUO serialization for context-preserving kexec: A
preserve_context kexec returns to the current kernel, which is unrelated
to live update where state is passed to the next kernel. Skipping
serialization avoids unnecessary work and prevents sessions from being
left in a frozen state upon return.
3. Block outgoing session mutations using locks: During the reboot()
syscall, user processes may still be running concurrently and attempting
to mutate sessions. To prevent this, we hold the session header's rwsem
and each session's mutex indefinitely on successful serialization. This
effectively pins the sessions and blocks concurrent modifications
without needing custom flags.
Tree: git.kernel.org/pub/scm/linux/kernel/git/tatashin/linux.git Branch:
luo-reboot-sync/v2
Pasha Tatashin (3):
kho: skip KHO data for context-preserving kexec
liveupdate: skip serialization for context-preserving kexec
liveupdate: block outgoing session mutations
kernel/kexec_core.c | 8 +++++---
kernel/liveupdate/kexec_handover.c | 3 ++-
kernel/liveupdate/luo_session.c | 12 +++++++++---
3 files changed, 16 insertions(+), 7 deletions(-)
base-commit: 7b0b68b2b95606e65594958686833e53423f58f2
--
2.54.0.545.g6539524ca2-goog
More information about the kexec
mailing list