On 2023/11/13 20:09, Lianbo Jiang wrote:
 Since the panic_on_oops is disabled, when getting a BUG hit in the
code,
 the system continues and does not panic. However, a short time later, a
 hard lockup is hit and the system does panic. Even though the system
 panicked at hard lockup, the panic string is still the first BUG hit.
 For example:
 
 Without the patch:
    crash> sys|grep PANIC
           PANIC: "BUG: unable to handle kernel paging request at
ffffab835d7f9d50"
 
 With the patch:
    crash> sys|grep PANIC
           PANIC: "Kernel panic - not syncing: Hard LOCKUP"
 
 Let's search for the panic string based on the severity of the panic
 event, and also refactore the get_panicmsg() a little bit to improve
 readability.
 
 Reported-by: John Pittman <jpittman(a)redhat.com>
 Signed-off-by: Lianbo Jiang <lijiang(a)redhat.com>
 
Thanks for the fix and cleanup.
Looks good, applied with some indent tweaks.
https://github.com/crash-utility/crash/commit/262b1c71b485632ee3b56f5742e...
Thanks,
Kazu