]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Apr 2019 08:17:15 +0000 (10:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 29 Apr 2019 08:17:15 +0000 (10:17 +0200)
added patches:
cifs-do-not-attempt-cifs-operation-on-smb2-rename-error.patch

queue-4.4/cifs-do-not-attempt-cifs-operation-on-smb2-rename-error.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/cifs-do-not-attempt-cifs-operation-on-smb2-rename-error.patch b/queue-4.4/cifs-do-not-attempt-cifs-operation-on-smb2-rename-error.patch
new file mode 100644 (file)
index 0000000..9335372
--- /dev/null
@@ -0,0 +1,38 @@
+From 652727bbe1b17993636346716ae5867627793647 Mon Sep 17 00:00:00 2001
+From: Frank Sorenson <sorenson@redhat.com>
+Date: Tue, 16 Apr 2019 08:37:27 -0500
+Subject: cifs: do not attempt cifs operation on smb2+ rename error
+
+From: Frank Sorenson <sorenson@redhat.com>
+
+commit 652727bbe1b17993636346716ae5867627793647 upstream.
+
+A path-based rename returning EBUSY will incorrectly try opening
+the file with a cifs (NT Create AndX) operation on an smb2+ mount,
+which causes the server to force a session close.
+
+If the mount is smb2+, skip the fallback.
+
+Signed-off-by: Frank Sorenson <sorenson@redhat.com>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+CC: Stable <stable@vger.kernel.org>
+Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/inode.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/fs/cifs/inode.c
++++ b/fs/cifs/inode.c
+@@ -1669,6 +1669,10 @@ cifs_do_rename(const unsigned int xid, s
+       if (rc == 0 || rc != -EBUSY)
+               goto do_rename_exit;
++      /* Don't fall back to using SMB on SMB 2+ mount */
++      if (server->vals->protocol_id != 0)
++              goto do_rename_exit;
++
+       /* open-file renames don't work across directories */
+       if (to_dentry->d_parent != from_dentry->d_parent)
+               goto do_rename_exit;
index f6fe4983e6b09696ec71f3227a2fd9aa70474807..343c28113fe021ca7b542d7537dc9e4eedf90a87 100644 (file)
@@ -1,2 +1,3 @@
 kbuild-simplify-ld-option-implementation.patch
 kvm-fail-kvm_set_vcpu_events-with-invalid-exception-.patch
+cifs-do-not-attempt-cifs-operation-on-smb2-rename-error.patch