Skip to content

Commit 5eff62b

Browse files
soleenrppt
authored andcommitted
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: db8bed8 ("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>
1 parent eb2a736 commit 5eff62b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

kernel/kexec_core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,9 +1146,11 @@ int kernel_kexec(void)
11461146
goto Unlock;
11471147
}
11481148

1149-
error = liveupdate_reboot();
1150-
if (error)
1151-
goto Unlock;
1149+
if (!kexec_image->preserve_context) {
1150+
error = liveupdate_reboot();
1151+
if (error)
1152+
goto Unlock;
1153+
}
11521154

11531155
#ifdef CONFIG_KEXEC_JUMP
11541156
if (kexec_image->preserve_context) {

0 commit comments

Comments
 (0)