Received: by 10.213.65.68 with SMTP id h4csp2158048imn; Sun, 8 Apr 2018 21:12:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/e0fA5rhstvC1gV/iZ6wycILB8YON9tltgTFQSMackf6kyqGeuWxmOvCBMqpwR5pEswz96 X-Received: by 10.99.138.202 with SMTP id y193mr23878709pgd.224.1523247177276; Sun, 08 Apr 2018 21:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523247177; cv=none; d=google.com; s=arc-20160816; b=pPwZVAsFf4j+BkNxpDlTwD1TWkKy8WQtjve3pFN7yqm4uPHq3cthxtvI1f9Mis8OtE R70fDGlM/BOsq4d1IeFeZRogn62gQ3M/+Umx64jeiuzLL/Gc5I96pH56KsNbGzQjlJlQ Am2FxTro8mUf3bipbKamhG3xN5tcSiTW7koi7+hHe5lwL92bIb0KEQA2TasDpq96IXuA i8jWduy4SP+Gouh72JB1qrse0h6gUh3poPEYYwVYEXxYkTJZRUtXc4u7o45iQ2Ijzpy6 VsfJYnIu+exqo6JZDAvu21VM3VzFGW1DgrVI/BlxVHW4UHHoega5RR7lhOk7XSoJlpav HTDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Z5bsm864xvxGjT1l6ANHwN0iSnkfF9Og6dIuCVjhQi8=; b=vG8xycJMbxqXMHK4Q40fTTYMCZINYzrBwFo+iKVis1Aj0rn59WcobWbQyUJoCZUY+X EFwOHxQYYm1nAPzdt4P2z+d/teTAnJUZm+fo92/KAFxAFMrEYirGc1TShcX03BklHzR+ 0RT2ki/CKU4lzQzD8F43EXsHnkz3NR+maVwvl7lwv3bgiigTTV/F4ST0t7KTYnmVl+q0 fAkzXWxWwgZhLoORO41PnIthvvJ43e7cVeTQNdg4ltK4UjmAZ8lniuy9Hidy5i5PdoMr mXdmDsRbO/NM2iLhm2YF5ibvR/u3VE9GU7UOW/g2D9wcelgZY/8ASxfZ7DOPBZ4Sjd22 9bkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=H4GtVRcc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si1448833pgq.510.2018.04.08.21.12.20; Sun, 08 Apr 2018 21:12:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=H4GtVRcc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753837AbeDIEH3 (ORCPT + 99 others); Mon, 9 Apr 2018 00:07:29 -0400 Received: from mail-bl2nam02on0136.outbound.protection.outlook.com ([104.47.38.136]:51875 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753183AbeDIARr (ORCPT ); Sun, 8 Apr 2018 20:17:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Z5bsm864xvxGjT1l6ANHwN0iSnkfF9Og6dIuCVjhQi8=; b=H4GtVRccWPU7x3u89ZjAO9vVMyAsNj+DgHqIVFt1imL+AKgVnFgjeRGVtQmcT1q67FjRJkiymKo46fcjNCph4fFDskR+UIOY6Ta5CbqTZidUdM9XabBU/y6Izk7mxoL5AvEcc8CJz9ElQlo6YgPk/79csXCg2Xuu4gGDhqX2Iik= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1048.namprd21.prod.outlook.com (52.132.128.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:17:42 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:17:42 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Nicholas Piggin , Michael Ellerman , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 034/189] powerpc: System reset avoid interleaving oops using die synchronisation Thread-Topic: [PATCH AUTOSEL for 4.15 034/189] powerpc: System reset avoid interleaving oops using die synchronisation Thread-Index: AQHTz5gbh8L0E9ssOUOQnUUbKgz09A== Date: Mon, 9 Apr 2018 00:17:13 +0000 Message-ID: <20180409001637.162453-34-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1048;7:86UxAldKQKjoqb+e4E1nJlU8ZE0Rkvt2tFGBzdBco7WIL+L/gUBMQY2fXWmtLOQubR04PLJ7gbb+63FZ+hK9Rj4Bh0eORakvKM7lragU5Ce9AWPsGJ+HBm3DUs4QvkWnh67bgMgvGjk0Dd4IWUvgGSvMxSzZTUntQ7ZoO2spzf5GjbNaUNRN44bCksB+65deyRTKMedp9mk+PYpqYInOVGu8EOzlYPP4Ry2/gtJhRoCGW/aVfBGYxKisERxURWhW;20:HIOi/Wqqb4ghrYqn0zuOps3rzvI29PCLI2F+ycFZjT90r1QTx8sZBA+0zVILCMmCQdfGJn5WVxFR2r8rUeaCYIoyK9uR9l2d6vm7Q225KJhFGQ9jdUsHrKK5SUlw2PbxdVrgLknqzvgs8rDAgA2v8IZ2+8yl5/2qgpz5iJa1eEQ= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 5edf9d46-3faa-4e2c-82e1-08d59daf4ff3 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1048; x-ms-traffictypediagnostic: DM5PR2101MB1048: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(20558992708506)(89211679590171)(85827821059158); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011);SRVR:DM5PR2101MB1048;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1048; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(39380400002)(376002)(39860400002)(346002)(396003)(189003)(199004)(86362001)(1076002)(575784001)(99286004)(6116002)(110136005)(3846002)(54906003)(39060400002)(22452003)(3280700002)(105586002)(2906002)(76176011)(4326008)(6512007)(6436002)(6486002)(3660700001)(6666003)(7736002)(59450400001)(86612001)(25786009)(2900100001)(14454004)(97736004)(53936002)(107886003)(68736007)(102836004)(36756003)(6506007)(26005)(186003)(106356001)(305945005)(5250100002)(72206003)(478600001)(2501003)(10290500003)(81166006)(5660300001)(8676002)(66066001)(316002)(81156014)(2616005)(10090500001)(11346002)(446003)(476003)(8936002)(486006)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1048;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: oNWUIHBfXKvd9wiTGV1jt7AzUswgmdoXt8F4Wl2x1CWAZq5HYYPZVQXzdsnDpBVDve9kycbhTshdYzweUj0hd5w1WVUPLhLfMWQJbI6+Zv9Wm52F8eCkhv1E106v0Ro+ZXvVUIyWQNO8gj18qmNiD0wkbk8Yhc8AVv5INyEGH0XkZOJU2yBIeO8U4zqyNW0W4vGX6P4A1QO9rZSKNV8k7hnYKKTeSBAMgcRcwbyBOWq7JK8MfZKOM36YACnu5e0Zg5Wjfa4sanw+QG0yLuhMVAUScUqFAmnFoOutuJihiLIWypL25nqvE8p0hgKXJqe1ohsiPYAOIH+wIPnSB67q4JFPMtcV5LnhpHl2sTloqCacOtpFq5GGm8+8QyIbBoAVggEPTW+0gxEczQIHUefmy0FgrsLlWcnlHH+q1LKD40U= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5edf9d46-3faa-4e2c-82e1-08d59daf4ff3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:17:13.2924 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1048 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Piggin [ Upstream commit 4552d128c26e0f0f27a5bd2fadc24092b8f6c1d7 ] The die() oops path contains a serializing lock to prevent oops messages from being interleaved. In the case of a system reset initiated oops (e.g., qemu nmi command), __die was being called which lacks that synchronisation and oops reports could be interleaved across CPUs. A recent patch 4388c9b3a6ee7 ("powerpc: Do not send system reset request through the oops path") changed this to __die to avoid the debugger() call, but there is no real harm to calling it twice if the first time fell through. So go back to using die() here. This was observed to fix the problem. Fixes: 4388c9b3a6ee7 ("powerpc: Do not send system reset request through th= e oops path") Signed-off-by: Nicholas Piggin Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index f3eb61be0d30..109989676776 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c @@ -337,7 +337,7 @@ void system_reset_exception(struct pt_regs *regs) * No debugger or crash dump registered, print logs then * panic. */ - __die("System Reset", regs, SIGABRT); + die("System Reset", regs, SIGABRT); =20 mdelay(2*MSEC_PER_SEC); /* Wait a little while for others to print */ add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE); --=20 2.15.1