]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
x86/mce/inject: Fix a wrong assignment of i_mce.status
authorZhenzhong Duan <zhenzhong.duan@gmail.com>
Thu, 11 Jun 2020 02:32:38 +0000 (10:32 +0800)
committerBorislav Petkov <bp@suse.de>
Mon, 15 Jun 2020 11:38:55 +0000 (13:38 +0200)
The original code is a nop as i_mce.status is or'ed with part of itself,
fix it.

Fixes: a1300e505297 ("x86/ras/mce_amd_inj: Trigger deferred and thresholding errors interrupts")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Yazen Ghannam <yazen.ghannam@amd.com>
Link: https://lkml.kernel.org/r/20200611023238.3830-1-zhenzhong.duan@gmail.com
arch/x86/kernel/cpu/mce/inject.c

index 0593b192eb8fae76c49a5459180b3fb63968565b..7843ab3fde099d58c88a11a1c7fbcde9b9929795 100644 (file)
@@ -511,7 +511,7 @@ static void do_inject(void)
         */
        if (inj_type == DFR_INT_INJ) {
                i_mce.status |= MCI_STATUS_DEFERRED;
-               i_mce.status |= (i_mce.status & ~MCI_STATUS_UC);
+               i_mce.status &= ~MCI_STATUS_UC;
        }
 
        /*