summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorPasha Tatashin <pasha.tatashin@soleen.com>2026-05-27 20:27:33 +0000
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-06-01 09:19:38 +0300
commit5eff62b051fbdb686e885c1468301d964f2e3d66 (patch)
treee739dc8f4dfee16565ac18eed1d374dfb782e506 /kernel
parenteb2a73624ed07e4b69adeaec1ce3a62a7236f1ff (diff)
liveupdate: skip serialization for context-preserving kexec
A preserve_context kexec returns to the current kernel, which is unrelated to live update where the state is passed to the next kernel. Skip liveupdate_reboot() in this case to avoid serialization and prevent sessions from being left in a frozen state upon return. Fixes: db8bed8082dc ("kexec: call liveupdate_reboot() before kexec") Reported-by: Oskar Gerlicz Kowalczuk <oskar@gerlicz.space> Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Link: https://patch.msgid.link/20260527202737.1345192-2-pasha.tatashin@soleen.com Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec_core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index a43d2da0fe3e..dc770b9a6d05 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1146,9 +1146,11 @@ int kernel_kexec(void)
goto Unlock;
}
- error = liveupdate_reboot();
- if (error)
- goto Unlock;
+ if (!kexec_image->preserve_context) {
+ error = liveupdate_reboot();
+ if (error)
+ goto Unlock;
+ }
#ifdef CONFIG_KEXEC_JUMP
if (kexec_image->preserve_context) {