Re: [PATCH 1/3] x86/mce: Reset MCA_SYND between bank scans

From: Yazen Ghannam

Date: Thu Sep 03 2026 - 16:33:14 EST


On Sun, Aug 30, 2026 at 04:40:01AM +0000, OptoCloud wrote:
> machine_check_poll() and __mc_scan_banks() both reuse a single
> struct mce_hw_err while iterating over the MCA banks. The record is
> zeroed once before the loop; each iteration then resets only MISC
> and ADDR.
>
> On SMCA, mce_read_aux() writes SYND only when MCI_STATUS_SYNDV is
> set. Nothing clears it again, so a bank that does not set SYNDV
> inherits the SYND value read for the previous bank in the same
> scan, and that stale value is printed and handed to the decoders as
> if it belonged to the current error.

True, but harmless in practice. If SYNDV is not set, then decoders
should not consider the value of MCA_SYND. It doesn't matter if the
value is '0' or garbage.

>
> Reset SYND at the start of each iteration in both loops, alongside
> the existing MISC and ADDR resets.
>
> Found by code inspection; not reproduced on hardware.
>
> Fixes: db819d60f672 ("x86/mce: Add support for new MCA_SYND register")
> Cc: stable@xxxxxxxxxxxxxxx

I don't agree that this needs to go to the stable branches, since it's
not fixing a practical bug.

> Signed-off-by: Eirik Bøe <git@xxxxxxxxxxxx>

Overall, I think this is a fair patch. It does bring the MCA_SYND
behavior inline with the other registers.

Besides the minor nits above this looks good to me.

Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>

Thanks,
Yazen