From patchwork Fri Dec 2 16:37:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 28782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp722413wrr; Fri, 2 Dec 2022 00:57:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf75zkDpq+gkozhITHH1Qr08o15nZDlZK1rOCRtEsQfhDFc4KfuqChfaRl+FADCu0dXAQ7M0 X-Received: by 2002:a17:906:240f:b0:7c0:9f04:1938 with SMTP id z15-20020a170906240f00b007c09f041938mr9706406eja.769.1669971443169; Fri, 02 Dec 2022 00:57:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669971443; cv=none; d=google.com; s=arc-20160816; b=XfS59WG3ca4mMM5fyTx2q/bN6AoBnJcKBzKMFdAubIsPvdxkNHTs9T44H8zLn0VI63 VavvH9+j5DOJHX1q8xZobfm1RTt+szc72hMesKpn2g5izWTFd061/iahcXSBfujP5101 z6/8lL6xmvBzDtg1hVpWx+F2xeLCM5EM73Pvx4lEqWaNJMs20h2FQSPtgGT+oUysurwO lbv3ZP3UgtDxPw7MRKtNf98b2TNWxnQefvv9EcnhdRvEby1q/VpHmsd3/4p92jMODHY3 AuUUv9tBzvt2juYZS6Z51ot+PD1Lgm5pNI43dA+kdS0BTcUWskFDSmOVMuT0JuR9Uq5L ai6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=qSijVcS+pYnrKUTqCRXo0uXIXjTqUFQ9B8XumikFlk8=; b=FeJuOx7Kp6DI74FioSgnuS/OLjY6as5pwym4nruvja+BAV0wN4ysV+lKKTZHIQqdGj HXIZk8O8RNwFvDeOZtpdZSZViOEASfT/uCTT/3ofpgr0LmLGjp4kmE73hPR9s4cde16C iGgtTPxi0jdP3EK1qRTotUVm2YuNb5KSnYWPzB7K2zeKxkkUUXcQDO3EsJ+snNnCJr+D fj/sPFbvrpK5CSD2MnOaMyMWx4+4ZeyjJVU46WqAXuk75Xl65JCaz3mYcEnH3L36ZYAK 4A79xVsQt/A6E8afHdUq1h1/pTCaWRt7zXh/wMUmcAHCKwuXR9gnFAuaY8uALW6+xhc4 9q/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr29-20020a1709073f9d00b007b6ff799abasi5461256ejc.465.2022.12.02.00.56.56; Fri, 02 Dec 2022 00:57:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232331AbiLBIm5 (ORCPT + 99 others); Fri, 2 Dec 2022 03:42:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232608AbiLBImt (ORCPT ); Fri, 2 Dec 2022 03:42:49 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C0913E2E; Fri, 2 Dec 2022 00:42:45 -0800 (PST) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NNmZY63JGzJp9B; Fri, 2 Dec 2022 16:39:17 +0800 (CST) Received: from huawei.com (10.175.104.170) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 2 Dec 2022 16:42:42 +0800 From: Miaohe Lin To: , , , , CC: , , , , Subject: [PATCH] mce: fix missing stack-dumping in mce_panic() Date: Sat, 3 Dec 2022 00:37:28 +0800 Message-ID: <20221202163728.392509-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751091975615980787?= X-GMAIL-MSGID: =?utf-8?q?1751091975615980787?= When machine check exception occurs, there is no stack-dumping now in mce_panic(). It's because bust_spinlocks(1) is called prematurely so oops_in_progress will be >= 2 when trying to call dump_stack() in panic(). Thus dump_stack() won't be called as this is considered as nested stack-dumping. Signed-off-by: Miaohe Lin Tested-by: Tony Luck --- arch/x86/kernel/cpu/mce/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 2c8ec5c71712..c40dad1a6749 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -254,7 +254,6 @@ static noinstr void mce_panic(const char *msg, struct mce *final, char *exp) wait_for_panic(); barrier(); - bust_spinlocks(1); console_verbose(); } else { /* Don't log too much for fake panic */