RE: [PATCH] mce: fix missing stack-dumping in mce_panic()

From: Luck, Tony
Date: Fri Dec 02 2022 - 09:44:14 EST


> When machine check exception occurs, there is no stack-dumping now in
> mce_panic(). It's because bust_spinlocks(1) is called prematurely so
> oops_in_progress will be >= 2 when trying to call dump_stack() in
> panic(). Thus dump_stack() won't be called as this is considered as
> nested stack-dumping.

I had an earlier patch series to just dump from "interesting" machine checks
(I think the interesting ones are when the kernel hit poison in code that hadn't
been tagged in the extable as recoverable)

https://lore.kernel.org/all/20220922195136.54575-1-tony.luck@xxxxxxxxx/

Discussion on that fizzled out.

Thanks for tracking down why panic() didn't provide a stack dump.

I'm still of the opinion that stack dumps from machine checks aren't
generally useful. But I'd rather have extra stack dumps than no stack
dumps at all.

-Tony