kernel/panic.c: Move the location of bust_spinlocks to prevent hanging.
JIRA: https://issues.redhat.com/browse/RHEL-15897
Upstream Status: RHEL-Only
In current RHEL 9.3+ implementation, the kernel will have a tendency to hang when printing a call trace on panic, especially in NMI context. Note that this is also the case in contexts where a race condition may occur in attempt to acquire the console lock.
In some testing with upstream printk, consoles were not flushed after the panic was hit. This is a change from current RHEL behavior.
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
Edited by Derek Barbosa