Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp131628imm; Thu, 2 Aug 2018 15:28:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdia6gACtbUyfN1Mv1Qvbl33iJN/hCU4R6JdF22ZfYcMDad684+gDWWtEsAzPIdcXXK4bJJ X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr1118113plo.88.1533248886143; Thu, 02 Aug 2018 15:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533248886; cv=none; d=google.com; s=arc-20160816; b=EsohNdL0lntm5lKJF+pTJb2T/o4+hHhf2GGPQrjvUPZDO8f/+hKNe0jSCdK4m8473c Hfh/A6UbSOCZOIAiPTpvbMGvuzVy3/OVF9vjBmTdMk/uDy/OeLNNIU4es3dTHJZDV30R o087seENZ+vfuMSHTpHOS0XC4OkK2buehexGXPy+/P8TZVo571jeAfA90orjM1Z4g5Ih FIJqWwRRyeSAc1HpuNDsibmuQbPLG37/DvmZTi+C3bufyQlEw07vKvsKUGpZrmWt7kv8 ll7yXm2eejCzOIAmC7itYQmaHKGb0i+8pAbF6+CGcsYFrOQPfZ5WvSOIDjGFugMWI9T2 N+GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AKgMtlp1tQT4i8OeO/voobmYhlyaHZwKxxS+IzgDqiI=; b=gqH+hZNc979REYBlE8L8ebyCqpeteVeV/FHADi8gg56rRBu3rhPxmFZMMsRZc5EWbL I3kzO3xYe+BDK+6ncLELCtUtDpU60KKMKIPjv5/841WFl20GzbiQxWOKfpgBFNZczPP/ 075UVD2bT9MBP+jqQsd0MhmBaEPXCh39FgCY1+eVRxb2pvZ4Eaav++d7FianXc8JLbN0 pB8dDEb82Chnn0I8ugt2RmOfih8DaLKibSUc6JSJFSznRslzWlADznjqpiSKk8kbBcUx Xs/kFOof5Y74gBF/IdVm5BEVxGXcLcN+Qbf19EE373Lw70VpuN9/ERvHXhzfdrDK73K3 x7Hw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16-v6si3199107pga.442.2018.08.02.15.27.51; Thu, 02 Aug 2018 15:28:06 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732328AbeHCATq (ORCPT + 99 others); Thu, 2 Aug 2018 20:19:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:35060 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732299AbeHCATq (ORCPT ); Thu, 2 Aug 2018 20:19:46 -0400 Received: from localhost.localdomain (c-98-220-238-81.hsd1.il.comcast.net [98.220.238.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CA48D215EB; Thu, 2 Aug 2018 22:26:34 +0000 (UTC) From: Tom Zanussi To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Cc: rostedt@goodmis.org, tglx@linutronix.de, C.Emde@osadl.org, jkacur@redhat.com, bigeasy@linutronix.de, daniel.wagner@siemens.com, julia@ni.com, stable-rt@vger.kernel.org, Tom Zanussi Subject: [PATCH 08/15] seqlock: provide the same ordering semantics as mainline Date: Thu, 2 Aug 2018 17:25:23 -0500 Message-Id: <650bfc722354f3307e6390ddddf1e4ee4e9dced2.1533242791.git.tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Julia Cartwright The mainline implementation of read_seqbegin() orders prior loads w.r.t. the read-side critical section. Fixup the RT writer-boosting implementation to provide the same guarantee. Also, while we're here, update the usage of ACCESS_ONCE() to use READ_ONCE(). Fixes: e69f15cf77c23 ("seqlock: Prevent rt starvation") Cc: stable-rt@vger.kernel.org Signed-off-by: Julia Cartwright Signed-off-by: Sebastian Andrzej Siewior (cherry picked from commit afa4c06b89a3c0fb7784ff900ccd707bef519cb7) Signed-off-by: Tom Zanussi --- include/linux/seqlock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 4acd0e2fb5cb..efa234031230 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -338,6 +338,7 @@ repeat: spin_unlock_wait(&sl->lock); goto repeat; } + smp_rmb(); return ret; } #endif -- 2.14.1