Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3606c64 authored by Pavel Shilovsky's avatar Pavel Shilovsky Committed by Greg Kroah-Hartman
Browse files

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: default avatarPavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1130682
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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)