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

Andrea Parri
2019-04-29T20:15:25Z

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@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Omar Sandoval <osandov@fb.com>
Cc: "Yan, Zheng" <zyan@redhat.com>
Cc: Sage Weil <sage@redhat.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Dennis Dalessandro <dennis.dalessandro@intel.com>
Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
Cc: Doug Ledford <dledford@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>

[1] http://lkml.kernel.org/r/20190420085440.GK14111@linux.ibm.com

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