mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
CIFS: Do not set credits to 1 if the server didn't grant anything
commit 33fa5c8b8a 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d1130682d1
commit
c3606c6467
@@ -885,8 +885,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)
|
||||
|
||||
Reference in New Issue
Block a user