[PATCH 0/5] Fix improper uses of smp_mb__{before,after}_atomic()

From: Andrea Parri
Date: Mon Apr 29 2019 - 16:15:26 EST


Hello!

A relatively common misuse of these barriers is to apply these to
operations which are not read-modify-write operations, such as
atomic_set() and atomic_read(); examples were discussed in [1].

This series attempts to fix those uses by (conservatively) replacing
the smp_mb__{before,after}_atomic() barriers with full memory barriers.

Applies on 5.1-rc7.

Thanks,
Andrea

Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Rob Clark <robdclark@xxxxxxxxx>
Cc: Sean Paul <sean@xxxxxxxxxx>
Cc: David Airlie <airlied@xxxxxxxx>
Cc: Daniel Vetter <daniel@xxxxxxxx>
Cc: Jordan Crouse <jcrouse@xxxxxxxxxxxxxx>
Cc: Jens Axboe <axboe@xxxxxxxxx>
Cc: Omar Sandoval <osandov@xxxxxx>
Cc: "Yan, Zheng" <zyan@xxxxxxxxxx>
Cc: Sage Weil <sage@xxxxxxxxxx>
Cc: Ilya Dryomov <idryomov@xxxxxxxxx>
Cc: Dennis Dalessandro <dennis.dalessandro@xxxxxxxxx>
Cc: Mike Marciniszyn <mike.marciniszyn@xxxxxxxxx>
Cc: Doug Ledford <dledford@xxxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>

[1] http://lkml.kernel.org/r/20190420085440.GK14111@xxxxxxxxxxxxx

Andrea Parri (5):
drm/msm: Fix improper uses of smp_mb__{before,after}_atomic()
bio: fix improper use of smp_mb__before_atomic()
sbitmap: fix improper use of smp_mb__before_atomic()
ceph: fix improper use of smp_mb__before_atomic()
IB/hfi1: Fix improper uses of smp_mb__before_atomic()

drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 4 ++--
drivers/infiniband/sw/rdmavt/qp.c | 6 +++---
fs/ceph/super.h | 2 +-
include/linux/bio.h | 2 +-
lib/sbitmap.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)

--
2.7.4