Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2019-08-27 11:14:09 +0100
committerLuis Henriques <lhenriques@suse.com>2019-09-05 10:07:45 +0100
commitbd00ea53c7b6d2c034548c29ac0a27610b6e46fd (patch)
tree138efc501063e49e002be5c7a2049d5a11bece71
parent35591684b7e0d7c7e6b0164b392fbdbe57135490 (diff)
ceph: fix improper use of smp_mb__before_atomic() (bsc#1148133).
-rw-r--r--patches.suse/ceph-fix-improper-use-of-smp_mb__before_atomic.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.suse/ceph-fix-improper-use-of-smp_mb__before_atomic.patch b/patches.suse/ceph-fix-improper-use-of-smp_mb__before_atomic.patch
new file mode 100644
index 0000000000..97b6034377
--- /dev/null
+++ b/patches.suse/ceph-fix-improper-use-of-smp_mb__before_atomic.patch
@@ -0,0 +1,42 @@
+From: Andrea Parri <andrea.parri@amarulasolutions.com>
+Date: Mon, 20 May 2019 19:23:58 +0200
+Subject: ceph: fix improper use of smp_mb__before_atomic()
+Git-commit: 749607731e26dfb2558118038c40e9c0c80d23b5
+Patch-mainline: v5.3-rc1
+References: bsc#1148133
+
+This barrier only applies to the read-modify-write operations; in
+particular, it does not apply to the atomic64_set() primitive.
+
+Replace the barrier with an smp_mb().
+
+Fixes: fdd4e15838e59 ("ceph: rework dcache readdir")
+Reported-by: "Paul E. McKenney" <paulmck@linux.ibm.com>
+Reported-by: Peter Zijlstra <peterz@infradead.org>
+Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
+Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/super.h | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/fs/ceph/super.h b/fs/ceph/super.h
+index 7209548527ab..29ea4eba98fe 100644
+--- a/fs/ceph/super.h
++++ b/fs/ceph/super.h
+@@ -545,7 +545,12 @@ static inline void __ceph_dir_set_complete(struct ceph_inode_info *ci,
+ long long release_count,
+ long long ordered_count)
+ {
+- smp_mb__before_atomic();
++ /*
++ * Makes sure operations that setup readdir cache (update page
++ * cache and i_size) are strongly ordered w.r.t. the following
++ * atomic64_set() operations.
++ */
++ smp_mb();
+ atomic64_set(&ci->i_complete_seq[0], release_count);
+ atomic64_set(&ci->i_complete_seq[1], ordered_count);
+ }
+
diff --git a/series.conf b/series.conf
index a43107248f..bc7fb2911b 100644
--- a/series.conf
+++ b/series.conf
@@ -23912,6 +23912,7 @@
patches.suse/ceph-silence-a-checker-warning-in-mdsc_show.patch
patches.suse/ceph-clean-up-ceph-dir-pin-vxattr-name-sizeof.patch
patches.suse/ceph-fix-ceph-dir-rctime-vxattr-value.patch
+ patches.suse/ceph-fix-improper-use-of-smp_mb__before_atomic.patch
patches.suse/cifs-Use-kmemdup-in-SMB2_ioctl_init-.patch
patches.suse/fs-cifs-Drop-unlikely-before-IS_ERR-_OR_NULL-.patch
patches.suse/SMB3-Add-SMB3-1-1-GCM-to-negotiated-crypto-algorigthms.patch