Skip to content

Commit d3f14e9

Browse files
committed
Merge: Revert "kernel/panic.c: Move the location of bust_spinlocks to prevent hanging."
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4526 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> Approved-by: Marc Milgram <mmilgram@redhat.com> Approved-by: Lucas Zampieri <lzampier@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents d2d71bf + 79f91ee commit d3f14e9

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)