From patchwork Mon Aug 17 15:13:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 266194 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C204AC433E5 for ; Mon, 17 Aug 2020 18:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EF9A2063A for ; Mon, 17 Aug 2020 18:32:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597689172; bh=BHwwznOHRXqH0/INcL7kGleLn2SPdbjSB+EJBL7s76U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=g9BjzM/Mu4aYt4jwj065qAy5qdyugqtASEMZCII0WPQdJ/8JbO8YJySv0GtvPfwye SDN5r9P6Az+5HB7OwQv2qUosJqxbvZfoSBPGvkBJeeTd3pY5i06C+ev1VbnXfDQxFe gWIrZI0UkV+G5eNVpSxWnd7MhGFDGgVahZNUHp7w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391153AbgHQScw (ORCPT ); Mon, 17 Aug 2020 14:32:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:48102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387520AbgHQQAl (ORCPT ); Mon, 17 Aug 2020 12:00:41 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C615320748; Mon, 17 Aug 2020 16:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680040; bh=BHwwznOHRXqH0/INcL7kGleLn2SPdbjSB+EJBL7s76U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y4gzOLbL9/PHKgtaW6NrLSDWwSlnxW4renHVUHfC8umpShpAe1PJSwupdoXZGG0br XoPe6NrcGGiRt2KkxmY7Let+zWZWas61g+515PJbEqbZayx5wm8FaF83QmayTFTpGv 79Oif5BF17tvPk1XYQ3IterL6Oip5/SUcm6hPKx0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhenzhong Duan , Borislav Petkov , Yazen Ghannam , Sasha Levin Subject: [PATCH 5.4 006/270] x86/mce/inject: Fix a wrong assignment of i_mce.status Date: Mon, 17 Aug 2020 17:13:27 +0200 Message-Id: <20200817143756.124889534@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhenzhong Duan [ 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 Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Link: https://lkml.kernel.org/r/20200611023238.3830-1-zhenzhong.duan@gmail.com Signed-off-by: Sasha Levin --- 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 1f30117b24ba7..eb2d41c1816d6 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; } /*