]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 07:48:02 +0000 (09:48 +0200)
[ Upstream commit 5d7f7d1d5e01c22894dee7c9c9266500478dca99 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/cpu/mcheck/mce-inject.c

index e57b59762f9f5f7b33126cea9de96c4dfd8eaf02..94aa91b09c2880d8737f9060dbbb4827b9b4b7a3 100644 (file)
@@ -518,7 +518,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;
        }
 
        /*