Home Home > GIT Browse
diff options
authorPavel Shilovsky <pshilov@microsoft.com>2019-01-03 16:45:13 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-16 22:03:21 +0100
commitc636811d21da9e015833a8dd385831f930ef0e4c (patch)
parent44057fc8cc45a5cd2d29989befde907015179f8d (diff)
CIFS: Do not set credits to 1 if the server didn't grant anything
commit 33fa5c8b8a7dbe6353a56eaa654b790348890d42 upstream. Currently we reset the number of total credits granted by the server to 1 if the server didn't grant us anything int the response. This violates the SMB3 protocol - we need to trust the server and use the credit values from the response. Fix this by removing the corresponding code. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 83ff0c25710d..ddab8c798389 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -892,8 +892,6 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
for (i = 0; i < num_rqst; i++)
if (midQ[i]->resp_buf)
credits += ses->server->ops->get_credits(midQ[i]);
- if (!credits)
- credits = 1;
for (i = 0; i < num_rqst; i++) {
if (rc < 0)