Skip to content

Commit 56c91a1

Browse files
Baoquan Herafaeljw
authored andcommitted
kernel: kexec: remove the lock operation of system_transition_mutex
Function kernel_kexec() is called with lock system_transition_mutex held in reboot system call. While inside kernel_kexec(), it will acquire system_transition_mutex agin. This will lead to dead lock. The dead lock should be easily triggered, it hasn't caused any failure report just because the feature 'kexec jump' is almost not used by anyone as far as I know. An inquiry can be made about who is using 'kexec jump' and where it's used. Before that, let's simply remove the lock operation inside CONFIG_KEXEC_JUMP ifdeffery scope. Fixes: 55f2503 ("PM / reboot: Eliminate race between reboot and suspend") Signed-off-by: Baoquan He <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Pingfan Liu <[email protected]> Cc: 4.19+ <[email protected]> # 4.19+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6ee1d74 commit 56c91a1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/kexec_core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,6 @@ int kernel_kexec(void)
11341134

11351135
#ifdef CONFIG_KEXEC_JUMP
11361136
if (kexec_image->preserve_context) {
1137-
lock_system_sleep();
11381137
pm_prepare_console();
11391138
error = freeze_processes();
11401139
if (error) {
@@ -1197,7 +1196,6 @@ int kernel_kexec(void)
11971196
thaw_processes();
11981197
Restore_console:
11991198
pm_restore_console();
1200-
unlock_system_sleep();
12011199
}
12021200
#endif
12031201

0 commit comments

Comments
 (0)