lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1570043211.946262289@decadent.org.uk>
Date:   Wed, 02 Oct 2019 20:06:51 +0100
From:   Ben Hutchings <ben@...adent.org.uk>
To:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC:     akpm@...ux-foundation.org, Denis Kirjanov <kda@...ux-powerpc.org>,
        "Omar Sandoval" <osandov@...com>,
        "Paul E. McKenney" <paulmck@...ux.ibm.com>,
        "Peter Zijlstra" <peterz@...radead.org>,
        linux-block@...r.kernel.org,
        "Andrea Parri" <andrea.parri@...rulasolutions.com>,
        "Jens Axboe" <axboe@...nel.dk>, "Ming Lei" <ming.lei@...hat.com>
Subject: [PATCH 3.16 22/87] sbitmap: fix improper use of smp_mb__before_atomic()

3.16.75-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Andrea Parri <andrea.parri@...rulasolutions.com>

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" <paulmck@...ux.ibm.com>
Reported-by: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Andrea Parri <andrea.parri@...rulasolutions.com>
Reviewed-by: Ming Lei <ming.lei@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Omar Sandoval <osandov@...com>
Cc: Ming Lei <ming.lei@...hat.com>
Cc: linux-block@...r.kernel.org
Cc: "Paul E. McKenney" <paulmck@...ux.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
 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);
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ