| From db1a9e2cf8cdf240dadf707e2e24d06450b36482 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Thu, 11 Jun 2020 10:32:38 +0800 |
| Subject: x86/mce/inject: Fix a wrong assignment of i_mce.status |
| |
| From: Zhenzhong Duan <zhenzhong.duan@gmail.com> |
| |
| [ 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/mce/inject.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c |
| index 3413b41b8d55f..dc28a615e340f 100644 |
| --- a/arch/x86/kernel/cpu/mce/inject.c |
| +++ b/arch/x86/kernel/cpu/mce/inject.c |
| @@ -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; |
| } |
| |
| /* |
| -- |
| 2.25.1 |
| |