Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1190947ybn; Wed, 2 Oct 2019 12:11:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYggi8ACkbITTcMsSs/9dDgR9cF1M11Q6X04gOfYuYdfgY9iMQnPKJxquvmspdFmt1mtfo X-Received: by 2002:a05:6402:128c:: with SMTP id w12mr5551705edv.158.1570043513892; Wed, 02 Oct 2019 12:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043513; cv=none; d=google.com; s=arc-20160816; b=n1u7nn+Kq5qGXRUGVCHwj0TYSkKgRBmrXRuMMK/i049UUQR7dqLa/iEx1Ij69Tt6gu MgkqDIKfo/szBIHPcyDwExQ+ULiHU6i4qBjIbtrI4sdq0513kMHqtcMOuTVfM6wsLBqs CYCjwrNfxmcTWkiGRej/oMzmYrcQPs0ieratDSILqY/Z+O36tr4WB3ldJOCWCyUwe6Un 5UHRn1dmKCzGOVOKkdH93N4sAk9RA3uzfY8/ohccHthxoWt5FZrFXCbWK+mArxY9OloA V21qXOeTPKEK41YMn9zDdq7TYtShOdOaG6GS5JpaiWsfjCjbKCSWPPDoo6iic4eLCJAD ATKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=gmVVEW9SqAYDXh3iSjWAFHJp+eIJ9D3BsIYD+1aJE1A=; b=gmBwqTZKVdPIJfXEuRW528DHNRVDCAvh3rn94w3Au810q+aZLxPMqjBrRZpY9wAw7E k0/9CCXP/4cPjX+qflwbQgz6vxHxZ61ZqSH6S5Kb3Wl7mvsXzTCFu5HrsIqMZoigDA2F P+aEjgIT6Z2WfeA3JYoVxxYoUoRd89vR3yC1xbnSP6B/12DEM/mamDbvm41mhvuHy15M esHYZu5ktppUVvFBxWooCqjvTmCrExjTEzsa/w3hAttdX8DMvLVUfqmDJ6oXRAm8H1bc 35m++gFn/5eHZqulRQXS6uVSlfNVF1MJH8EL6QcqwukJPY+3wu+DaduCPBqdJahrmwMD QyRQ== 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 lw9si21454ejb.51.2019.10.02.12.11.29; Wed, 02 Oct 2019 12:11:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729539AbfJBTIl (ORCPT + 99 others); Wed, 2 Oct 2019 15:08:41 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:36190 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729408AbfJBTIZ (ORCPT ); Wed, 2 Oct 2019 15:08:25 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyo-00035m-5T; Wed, 02 Oct 2019 20:08:06 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyn-0003ba-IN; Wed, 02 Oct 2019 20:08:05 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Omar Sandoval" , "Paul E. McKenney" , "Peter Zijlstra" , linux-block@vger.kernel.org, "Andrea Parri" , "Jens Axboe" , "Ming Lei" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 22/87] sbitmap: fix improper use of smp_mb__before_atomic() In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Andrea Parri commit a0934fd2b1208458e55fc4b48f55889809fce666 upstream. This barrier only applies to the read-modify-write operations; in particular, it does not apply to the atomic_set() primitive. Replace the barrier with an smp_mb(). Fixes: 6c0ca7ae292ad ("sbitmap: fix wakeup hang after sbq resize") Reported-by: "Paul E. McKenney" Reported-by: Peter Zijlstra Signed-off-by: Andrea Parri Reviewed-by: Ming Lei Cc: Jens Axboe Cc: Omar Sandoval Cc: Ming Lei Cc: linux-block@vger.kernel.org Cc: "Paul E. McKenney" Cc: Peter Zijlstra Signed-off-by: Jens Axboe [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings --- block/blk-mq-tag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -499,7 +499,7 @@ static void bt_update_count(struct blk_m * Pairs with the memory barrier in bt_clear_tag() to ensure * that the batch size is updated before the wait counts. */ - smp_mb__before_atomic(); + smp_mb(); for (i = 0; i < BT_WAIT_QUEUES; i++) atomic_set(&bt->bs[i].wait_cnt, 1); }