Re: [PATCH 08/23] CIFS: Count credits for malformed error pending responses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



пт, 1 февр. 2019 г. в 12:04, Pavel Shilovsky <piastryyy@xxxxxxxxx>:
>
> Even if the response is malformed, we should count credits
> granted by the server to avoid miscalculations and unnecessary
> reconnects due to client or server bugs. If the response has
> been received partially, the session will be reconnected anyway
> on the next iteration of the demultiplex thread, so counting
> credits for such cases shouldn't break things.
>
> Signed-off-by: Pavel Shilovsky <pshilov@xxxxxxxxxxxxx>
> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
> ---
>  fs/cifs/smb2ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 49667ae..79e23c3 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1761,7 +1761,7 @@ smb2_is_status_pending(char *buf, struct TCP_Server_Info *server, int length)
>         if (shdr->Status != STATUS_PENDING)
>                 return false;
>
> -       if (!length) {
> +       if (shdr->CreditRequest) {
>                 spin_lock(&server->req_lock);
>                 server->credits += le16_to_cpu(shdr->CreditRequest);
>                 spin_unlock(&server->req_lock);
> --
> 2.7.4
>

This is old version of the patch which has been sent together with the
new version:

"CIFS: Count SMB3 credits for malformed pending responses"

Please discard this one.

--
Best regards,
Pavel Shilovsky




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux