Home Home > GIT Browse > SLE12-SP5-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Henriques <lhenriques@suse.com>2019-08-27 11:51:08 +0100
committerLuis Henriques <lhenriques@suse.com>2019-09-05 10:08:48 +0100
commitba10d886a8e24156f043b74aa84624525bdf2d8c (patch)
tree305680f614450c387706bd7d916c2d58a372911e
parentd42cfc2988e042628fb628174d19e084d93561bd (diff)
ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply
(bsc#1148133).
-rw-r--r--patches.suse/ceph-don-t-try-fill-file_lock-on-unsuccessful-getfilelock-reply.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.suse/ceph-don-t-try-fill-file_lock-on-unsuccessful-getfilelock-reply.patch b/patches.suse/ceph-don-t-try-fill-file_lock-on-unsuccessful-getfilelock-reply.patch
new file mode 100644
index 0000000000..ccf9af3713
--- /dev/null
+++ b/patches.suse/ceph-don-t-try-fill-file_lock-on-unsuccessful-getfilelock-reply.patch
@@ -0,0 +1,36 @@
+From: Jeff Layton <jlayton@kernel.org>
+Date: Thu, 15 Aug 2019 06:23:38 -0400
+Subject: ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply
+Git-commit: 28a282616f56990547b9dcd5c6fbd2001344664c
+Patch-mainline: v5.3-rc6
+References: bsc#1148133
+
+When ceph_mdsc_do_request returns an error, we can't assume that the
+filelock_reply pointer will be set. Only try to fetch fields out of
+the r_reply_info when it returns success.
+
+Cc: stable@vger.kernel.org
+Reported-by: Hector Martin <hector@marcansoft.com>
+Signed-off-by: Jeff Layton <jlayton@kernel.org>
+Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Acked-by: Luis Henriques <lhenriques@suse.com>
+---
+ fs/ceph/locks.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c
+index ac9b53b89365..5083e238ad15 100644
+--- a/fs/ceph/locks.c
++++ b/fs/ceph/locks.c
+@@ -110,8 +110,7 @@ static int ceph_lock_message(u8 lock_typ
+ req->r_wait_for_completion = ceph_lock_wait_for_completion;
+
+ err = ceph_mdsc_do_request(mdsc, inode, req);
+-
+- if (operation == CEPH_MDS_OP_GETFILELOCK) {
++ if (!err && operation == CEPH_MDS_OP_GETFILELOCK) {
+ fl->fl_pid = le64_to_cpu(req->r_reply_info.filelock_reply->pid);
+ if (CEPH_LOCK_SHARED == req->r_reply_info.filelock_reply->type)
+ fl->fl_type = F_RDLCK;
+
diff --git a/series.conf b/series.conf
index f3345fe653..f4407bc8b0 100644
--- a/series.conf
+++ b/series.conf
@@ -24130,6 +24130,7 @@
patches.suse/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-_ceph_setxattr.patch
patches.suse/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-_ceph_build_xattrs_blob.patch
patches.suse/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fill_inode.patch
+ patches.suse/ceph-don-t-try-fill-file_lock-on-unsuccessful-getfilelock-reply.patch
patches.suse/vfs-fix-page-locking-deadlocks-when-deduping-files.patch
patches.suse/fs-xfs-Fix-return-code-of-xfs_break_leased_layouts.patch
patches.suse/Revert-dm-bufio-fix-deadlock-with-loop-device.patch