[3.16.y-ckt stable] Patch "cifs: smb2_clone_range() - exit on unhandled error" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Tue Apr 21 15:23:40 UTC 2015


This is a note to let you know that I have just added a patch titled

    cifs: smb2_clone_range() - exit on unhandled error

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt10.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c2838c9de591f1bc05a8d3f4fdc84576e42ab3a5 Mon Sep 17 00:00:00 2001
From: Sachin Prabhu <sprabhu at redhat.com>
Date: Wed, 4 Feb 2015 13:10:26 +0000
Subject: cifs: smb2_clone_range() - exit on unhandled error

commit 2477bc58d49edb1c0baf59df7dc093dce682af2b upstream.

While attempting to clone a file on a samba server, we receive a
STATUS_INVALID_DEVICE_REQUEST. This is mapped to -EOPNOTSUPP which
isn't handled in smb2_clone_range(). We end up looping in the while loop
making same call to the samba server over and over again.

The proposed fix is to exit and return the error value when encountered
with an unhandled error.

Signed-off-by: Sachin Prabhu <sprabhu at redhat.com>
Signed-off-by: Steve French <steve.french at primarydata.com>
Signed-off-by: Steve French <smfrench at gmail.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 fs/cifs/smb2ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f325c59e12e6..772ee0ecf32a 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -630,7 +630,8 @@ smb2_clone_range(const unsigned int xid,

 			/* No need to change MaxChunks since already set to 1 */
 			chunk_sizes_updated = true;
-		}
+		} else
+			goto cchunk_out;
 	}

 cchunk_out:




More information about the kernel-team mailing list