From patchwork Tue Mar 24 15:36:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 11455825 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 17D8414B4 for ; Tue, 24 Mar 2020 15:38:36 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 74CAB20714 for ; Tue, 24 Mar 2020 15:38:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="K0XCoPBm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74CAB20714 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-18165-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 26481 invoked by uid 550); 24 Mar 2020 15:37:21 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 26351 invoked from network); 24 Mar 2020 15:37:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585064228; bh=E5Moj5+y/0jzpIXcSSmKlyGx50dCga0UNXCRHKQpICA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K0XCoPBmOAuAnOLhnFxsmrVj3APUzwevP3MHRSPvNOqQpOQk4SlUvqzt5tZ9yQBaw cVUtxXlQLwN2SlAd2f9tuZGU90i0Rf+WYVcKWIwMhwoO+ksYJWGR7UZcms1SXzoTfd ET4KxQiaQRXLzCGEWqkXM5HVoq9uxtwAjemJraF4= From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Eric Dumazet , Jann Horn , Kees Cook , Maddie Stone , Marco Elver , "Paul E . McKenney" , Peter Zijlstra , Thomas Gleixner , kernel-team@android.com, kernel-hardening@lists.openwall.com Subject: [RFC PATCH 07/21] Revert "list: Use WRITE_ONCE() when adding to lists and hlists" Date: Tue, 24 Mar 2020 15:36:29 +0000 Message-Id: <20200324153643.15527-8-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200324153643.15527-1-will@kernel.org> References: <20200324153643.15527-1-will@kernel.org> MIME-Version: 1.0 This reverts commit 1c97be677f72b3c338312aecd36d8fff20322f32. There is no need to use WRITE_ONCE() for the non-RCU list and hlist implementations. Cc: Paul E. McKenney Cc: Peter Zijlstra Signed-off-by: Will Deacon --- include/linux/list.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/list.h b/include/linux/list.h index ec1f780d1449..c7331c259792 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -70,7 +70,7 @@ static inline void __list_add(struct list_head *new, next->prev = new; new->next = next; new->prev = prev; - WRITE_ONCE(prev->next, new); + prev->next = new; } /** @@ -843,7 +843,7 @@ static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) n->next = first; if (first) first->pprev = &n->next; - WRITE_ONCE(h->first, n); + h->first = n; n->pprev = &h->first; } @@ -858,7 +858,7 @@ static inline void hlist_add_before(struct hlist_node *n, n->pprev = next->pprev; n->next = next; next->pprev = &n->next; - WRITE_ONCE(*(n->pprev), n); + *(n->pprev) = n; } /**