Re: [PATCH] x86/mce/amd: Fix inverted interrupt enablement during storm handling

Yazen Ghannam <[email protected]>
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.stable
Message-ID <[email protected]>
On Fri, Aug 07, 2026 at 03:52:41PM -0700, Borislav Petkov wrote:
> On Fri, Aug 07, 2026 at 04:26:59PM -0600, Jasjeet Rangi wrote:
> > mce_amd_handle_storm() currently does the opposite of what storm
> > handling needs: it enables threshold interrupts when a storm is detected
> > and disables them when the storm subsides.
> 
> the subside path:
> 
> printk_deferred(KERN_NOTICE "CPU%d BANK%d CMCI storm subsided\n", smp_processor_id(), mce->bank);
> mce_handle_storm(mce->bank, false);
> |->mce_amd_handle_storm(bank, on)
> |-> threshold_restart_bank(bank, on);
> |-> tr.b->interrupt_enable = false;
> 
> while that commit Fixes: 5c4663ed1eac ("x86/mce: Handle AMD threshold
> interrupt storms") says:
> 
>     Rather, disable the interrupt on the corresponding CPU and bank.
>     Re-enable back the interrupts if enough consecutive polls of the bank show no
>     corrected errors (30, as programmed by Intel).
> 
> Yap, I see it.
> 
> I'm not sure about your approach to change the bool meaning - "on" is fine at
> a first glance and this fix should be minimal so that it is more easily
> backportable to stable - but yap, looks like we're doing it wrong.
> 

I agree the fix should be minimal, but I like having more explicit
variable names for clarity. Maybe split this patch in two? First is the
minimal fix to backport, and second is the variable renaming.

In any case, this looks good to me.

Reviewed-by: Yazen Ghannam <[email protected]>

Thanks,
Yazen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.