[tip: x86/urgent] x86/MCE/AMD: Fix inverted interrupt enablement during storm handling

From: tip-bot2 for Jasjeet Rangi

Date: Wed Sep 02 2026 - 17:39:46 EST


The following commit has been merged into the x86/urgent branch of tip:

Commit-ID: 7755fae2ea370ee914797c5bcca922836a818c3d
Gitweb: https://git.kernel.org/tip/7755fae2ea370ee914797c5bcca922836a818c3d
Author: Jasjeet Rangi <jrangi@xxxxxxxxxxxxxxx>
AuthorDate: Wed, 12 Aug 2026 16:15:13 -06:00
Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
CommitterDate: Wed, 02 Sep 2026 14:20:59 -07:00

x86/MCE/AMD: Fix inverted interrupt enablement during storm handling

mce_amd_handle_storm() currently does the opposite of what storm
handling needs: it enables thresholding interrupts when a storm is
detected and disables them when the storm subsides.

Flip the "on" function argument before passing it to threshold_restart_bank()
as it should have been done.

To clarify: "on" to mce_handle_storm() means, the storm is on now when
"on" is true, and off when "on" is false.

[ bp: Simplify. ]

Fixes: 5c4663ed1eac ("x86/mce: Handle AMD threshold interrupt storms")
Signed-off-by: Jasjeet Rangi <jrangi@xxxxxxxxxxxxxxx>
Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Link: https://patch.msgid.link/20260812221514.598842-2-jrangi@xxxxxxxxxxxxxxx
---
arch/x86/kernel/cpu/mce/amd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index f916fb4..1cc20b8 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -865,7 +865,7 @@ static void amd_deferred_error_interrupt(void)

void mce_amd_handle_storm(unsigned int bank, bool on)
{
- threshold_restart_bank(bank, on);
+ threshold_restart_bank(bank, !on);
}

static void amd_reset_thr_limit(unsigned int bank)