Skip to content

Commit 79f91ee

Browse files
author
Derek Barbosa
committed
Revert "kernel/panic.c: Move the location of bust_spinlocks to prevent hanging."
Upstream Status: RHEL-only JIRA: https://issues.redhat.com/browse/RHEL-39473 This reverts commit 065095b. Now that the upstream printk code has landed in c9s, remove the extraneous "bust_spinlock(1)" that remained after merge to prevent the abrupt "cut off" of call traces during panic. Revert commit 065095b Author: Derek Barbosa <debarbos@redhat.com> Date: Wed Dec 6 09:09:56 2023 -0500 kernel/panic.c: Move the location of bust_spinlocks to prevent hanging. JIRA: https://issues.redhat.com/browse/RHEL-15897 Upstream Status: RHEL-Only Moving bust_spinlocks() closer to pr_emerge in the panic() function (specifically prior to flushing the consoles) addresses the issue of the kernel hanging while printing out a call trace during a panic. Signed-off-by: Derek Barbosa <debarbos@redhat.com> Signed-off-by: Derek Barbosa <debarbos@redhat.com>
1 parent a81948d commit 79f91ee

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

kernel/panic.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,6 @@ void panic(const char *fmt, ...)
331331
buf[len - 1] = '\0';
332332

333333
pr_emerg("Kernel panic - not syncing: %s\n", buf);
334-
335-
/* Bust spinlocks before flushing console on panic to prevent hangs */
336-
bust_spinlocks(1);
337-
338334
#ifdef CONFIG_DEBUG_BUGVERBOSE
339335
/*
340336
* Avoid nested stack-dumping if a panic occurs during oops processing
@@ -363,14 +359,14 @@ void panic(const char *fmt, ...)
363359

364360
panic_other_cpus_shutdown(_crash_kexec_post_notifiers);
365361

362+
printk_legacy_allow_panic_sync();
363+
366364
/*
367365
* Run any panic handlers, including those that might need to
368366
* add information to the kmsg dump output.
369367
*/
370368
atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
371369

372-
printk_legacy_allow_panic_sync();
373-
374370
panic_print_sys_info(false);
375371

376372
kmsg_dump(KMSG_DUMP_PANIC);

0 commit comments

Comments
 (0)