Message ID | 20180409001936.162706-156-alexander.levin@microsoft.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp733740ljb; Sun, 8 Apr 2018 19:51:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx49unGa1hUHwWIsT26XkOYTJEbttxbcMDY/cpeWms8JZQFAb6LUVqd3nHt/ZXEkGx5VeU6Mq X-Received: by 10.101.88.78 with SMTP id s14mr9489337pgr.97.1523242297835; Sun, 08 Apr 2018 19:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523242297; cv=none; d=google.com; s=arc-20160816; b=b0Xdn+v3w2uC1Yl6BvBoLlH1uyM+8tR9xLbl6a4R3cDnxeaJ6FF5mgcT91ykIQf/ac QT/GDAXYhYNIXneAw8H2YwK/7eACj5aiYfRhIbRL0aNckIFeRwbo5AfaaUcVXIoEYr7J L5G6Nm290b3nO3ybG+U/R4KIISD2IxeErfT2T+5GC70YK5pfNF4f4VIbyFNY+gpQWAh4 eorOUKPdVVyFnVNYg15Hq5WZfAXqyI4yjTgcup1vFPQ8mB4WpFDbJdARwMcy2ZkbXswR +zkOcaIjIcN5mZLAbOrUzcJUefPSzGPuYVUQ4k0R/olfhkQYQihFqeMoXD54PFslHZOE 1dQg== 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=eupEr1OImIC1dqrHon02FUZNbis2rWHcIzoICgpkI+s=; b=plGvHDI0fAdfMm4nE/qlQDk5PL1YhPfOQKghKawd8UPqnQtT/SKYkhmpaqq3cMF8Yx P/Tj5et5+WEYcHAgHIUfGkksNz1EDEz3whx5UQXz560V9N0E+MFaOrwVEr6A3ksRWca0 r0VpbG2ODmVBNcpd4h+KSe7ETrXjljt9INttaOlOoMiEDxms6NDv8USmeDVgSXwopwF0 UYJESkbAIOsf9xlxflXIMr6qhrkJjEEBfSkTk+S/yuA0oaabOY73J+7FQ1EAXR7z4vJu Tvi8KkGkmvgoMM92BEqr05P/r0agXzkcY6E8uIenoD+EiBkTLwK8jmqmZfIjxwuHHHer C7fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=RXfbn8Wm; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t198si1272188pgc.600.2018.04.08.19.51.37; Sun, 08 Apr 2018 19:51:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=RXfbn8Wm; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S1755465AbeDICve (ORCPT <rfc822;semen.protsenko@linaro.org> + 11 others); Sun, 8 Apr 2018 22:51:34 -0400 Received: from mail-by2nam01on0099.outbound.protection.outlook.com ([104.47.34.99]:2811 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755340AbeDIA0c (ORCPT <rfc822;stable@vger.kernel.org>); Sun, 8 Apr 2018 20:26:32 -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=eupEr1OImIC1dqrHon02FUZNbis2rWHcIzoICgpkI+s=; b=RXfbn8WmfwMS25C1dNKKRQ5E0nv7A2YRfaLKeOujzOFcsIqfxgjPD92Lnji3Bfb0h5DcM15Jib2W0tiUchD4p6tHXUgufTKPmAVknPNznzKshhmIhjfrSH+/PYqEQZayBHiQvPxpmdsALgjdH1X6kAnIIlqYaKSfjIOwQR61vIU= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) 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:26:25 +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:26:25 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "stable@vger.kernel.org" <stable@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> CC: Will Deacon <will.deacon@arm.com>, Linus Torvalds <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@kernel.org>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL for 4.14 156/161] locking/qspinlock: Ensure node->count is updated before initialising node Thread-Topic: [PATCH AUTOSEL for 4.14 156/161] locking/qspinlock: Ensure node->count is updated before initialising node Thread-Index: AQHTz5jH4uJdvGUNy02wUjiAgr8Quw== Date: Mon, 9 Apr 2018 00:22:01 +0000 Message-ID: <20180409001936.162706-156-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-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; DM5PR2101MB1015; 7:53SuDfl/fo8WtDJ7+8JBn+G19qkD/ROwJ2yGTCersUFy3JFpKeF1HxPJs7ZnhZiwDzIZmWGV24hsfptHunaxUQJz7mQOBsQIOON9/xGOumMtkYH0zrYjF+6oIy1295rWF8dDT/v4xaQW2oHnEmAln6baOZfS/SVQhgGPtByXUPeF8Io7Cz/PyTYyu7YkUjhKY4kDw5dZVIcW0L7iR9IS7azspnxQIyFnlIWX+EPYKLxjHvrjfPTAER2/Ig+V7pyy; 20:Tg935W3i6SMr4pRzFRJ3EBeacJWv2BmcbDdTMD5+wLigZ+LN13LhBvZZj7fKZBGER8D2f5iuwXdIN7cgASy6Q1g2dtytYbImyjE1l98Y5Ody1D9ik3b6EkkW6Noe8NyJjBP+EyBZJ5eFBPROawZEWk8zfv2KD3iI/DjqZhdqFN4= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 04a717e3-0bb4-4e46-efa8-08d59db0874e x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB1015ECA67F3B743EDC35941AFBBF0@DM5PR2101MB1015.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171)(42068640409301); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR2101MB1015; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1015; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(396003)(39860400002)(39380400002)(376002)(346002)(366004)(51234002)(189003)(199004)(53936002)(4326008)(478600001)(72206003)(3280700002)(2616005)(14454004)(305945005)(5250100002)(3660700001)(2501003)(2900100001)(54906003)(110136005)(86362001)(1076002)(966005)(107886003)(6506007)(36756003)(446003)(68736007)(6512007)(7736002)(486006)(2906002)(6306002)(5660300001)(6436002)(3846002)(86612001)(6486002)(66066001)(11346002)(476003)(6666003)(59450400001)(26005)(10090500001)(316002)(22452003)(8676002)(81156014)(81166006)(6116002)(105586002)(99286004)(186003)(106356001)(76176011)(25786009)(97736004)(10290500003)(102836004)(8936002)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1015; 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: 7xvzHHzKptnVCXH9jUkY8u8aG8D7lJILlxsVQIhkWNC77ac9qfLDosxmItQrI3DQbB7eH9UMCpUSiuzAOBuTdlDYKA2ww9AZ4xsEfsZJwE/HP0fARqB60RtheUZqfSx6mlDF8QgrgoFdOiMQ98solg1xvswv7peUIbVpUgJN67rrbXYaDBDQHZdvRZC+RMTnedW4DUpEV01QCvq4GGyWzOtYg56aq5NpJOu4evLjyswduV1hEG+IQyICuPC+jPEz5rYeI489Q5IluqbQlhLqJuSP9xrv95P68xhA5xq4kd5dSC4jBmsSPOTxc1Fm3sNglVz3lsGrsXIUN/s4RouLdkUj0RddrH1nBKMWaRPd4Qb6ZU7z3GGjhnjgs7ZMAHhPUq/3m/Cmf7NWfiltOjuVhTkTfe5HKOePIuZeNahGi0Y= 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: 04a717e3-0bb4-4e46-efa8-08d59db0874e X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:22:01.5654 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/kernel/locking/qspinlock.c b/kernel/locking/qspinlock.c index 294294c71ba4..50dc42aeaa56 100644 --- a/kernel/locking/qspinlock.c +++ b/kernel/locking/qspinlock.c @@ -379,6 +379,14 @@ queue: tail = encode_tail(smp_processor_id(), idx); node += idx; + + /* + * Ensure that we increment the head node->count before initialising + * the actual node. If the compiler is kind enough to reorder these + * stores, then an IRQ could overwrite our assignments. + */ + barrier(); + node->locked = 0; node->next = NULL; pv_init_node(node);