Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1587007imj; Fri, 8 Feb 2019 04:05:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IYNvMk3RRluGbBs2UB18PM4We2cBjvkwX7wAa1rXNFXAa4YSF8jUlszS8R4vPP9uFJFAAYj X-Received: by 2002:a17:902:9b96:: with SMTP id y22mr8513994plp.179.1549627554200; Fri, 08 Feb 2019 04:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549627554; cv=none; d=google.com; s=arc-20160816; b=t2QSBj4z1WYU4K8bffnZyjwUgh94PDAqVUK1YHGaV/R9Re159TPffwC5N76PFh/W9a E5WO9gcTR3uDlDQEIZyHVbtzzdanNOG0uo6H6/YkiUWsjyNV1IO1qZ1BnIjFs9fZbY49 BCyGMdPm3JdA8+B/qVasifUpCT8cW/isL0E6MnRRHNJFLFjZwsR/RdCjIFCSqVgghRdD agC5RUhDyBpAigjQUHiZ5jcwnNVzq0zA9dPQzJJduQmVCFpbxJBMdluUQJzbvM/7BDFS mVbmeh/CG/5lwtF9dCDw8/5if0IBQXdAAyLLRKC9hNP32exabtC8ec1e62A3O8dmkZ1l 0ZrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=JtFfHvv7NrKXZInkC7KKgmxr2wm/TK8+gScSWU4OMOc=; b=kiAKMkIHNa9S5bcsGzF9UDh17IEzXcfs0Im2U5sNT7GqvsZJFvHM5DjPREz78OfMS/ CbCBqBXjxZEil94Zp6yMZwFPIHd+DS5iT/Od7OAVJoPldR4UWVLPTKZOgW5AxJpmO/v8 YePvf7BdOST5aoTO2xYU02eJK+Pao8YgDvMmhXjOZVKZRl96WWltfYejxbj3F5zEBC94 hPE0L03Cbr1Rzo4dz8SbOK8JbeqpaF86vqZhS1YaFInf4xB/3AWWod+OzvgkPUfTxCi0 iL38+F9eMC7ND7XNxBVvC0TB/16RDWWqqUvpEHjphfKAvxI0G4RVnYmBjvqS46C6vsRq sO9w== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u5si1956448pgi.146.2019.02.08.04.05.37; Fri, 08 Feb 2019 04:05:54 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727139AbfBHMFK (ORCPT + 99 others); Fri, 8 Feb 2019 07:05:10 -0500 Received: from terminus.zytor.com ([198.137.202.136]:49673 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbfBHMFJ (ORCPT ); Fri, 8 Feb 2019 07:05:09 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x18C4mQX2158784 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 8 Feb 2019 04:04:48 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x18C4l7D2158781; Fri, 8 Feb 2019 04:04:48 -0800 Date: Fri, 8 Feb 2019 04:04:48 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Davidlohr Bueso Message-ID: Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, dave@stgolabs.net, dbueso@suse.de, hpa@zytor.com, peterz@infradead.org, tglx@linutronix.de Reply-To: dave@stgolabs.net, dbueso@suse.de, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de In-Reply-To: <20190206185602.949-1-dave@stgolabs.net> References: <20190206185602.949-1-dave@stgolabs.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/urgent] futex: Fix barrier comment Git-Commit-ID: 6f568ebe2afefdc33a6fb06ef20a94f8b96455f1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 6f568ebe2afefdc33a6fb06ef20a94f8b96455f1 Gitweb: https://git.kernel.org/tip/6f568ebe2afefdc33a6fb06ef20a94f8b96455f1 Author: Davidlohr Bueso AuthorDate: Wed, 6 Feb 2019 10:56:02 -0800 Committer: Thomas Gleixner CommitDate: Fri, 8 Feb 2019 13:00:35 +0100 futex: Fix barrier comment The current comment for the barrier that guarantees that waiter increment is always before taking the hb spinlock (barrier (A)) needs to be fixed as it is misplaced. This is obviously referring to hb_waiters_inc, which is a full barrier. Reported-by: Peter Zijlstra Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20190206185602.949-1-dave@stgolabs.net --- kernel/futex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index fdd312da0992..5ec2473a3497 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2221,11 +2221,11 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) * decrement the counter at queue_unlock() when some error has * occurred and we don't end up adding the task to the list. */ - hb_waiters_inc(hb); + hb_waiters_inc(hb); /* implies smp_mb(); (A) */ q->lock_ptr = &hb->lock; - spin_lock(&hb->lock); /* implies smp_mb(); (A) */ + spin_lock(&hb->lock); return hb; }