aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/transport.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 5f224e999585..dc2d1b0bba58 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -530,6 +530,11 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses,
530 return rc; 530 return rc;
531 } 531 }
532 rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number); 532 rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number);
533 if (rc) {
534 mutex_unlock(&ses->server->srv_mutex);
535 cifs_small_buf_release(in_buf);
536 goto out;
537 }
533 538
534 midQ->midState = MID_REQUEST_SUBMITTED; 539 midQ->midState = MID_REQUEST_SUBMITTED;
535#ifdef CONFIG_CIFS_STATS2 540#ifdef CONFIG_CIFS_STATS2
@@ -718,6 +723,10 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
718 } 723 }
719 724
720 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number); 725 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
726 if (rc) {
727 mutex_unlock(&ses->server->srv_mutex);
728 goto out;
729 }
721 730
722 midQ->midState = MID_REQUEST_SUBMITTED; 731 midQ->midState = MID_REQUEST_SUBMITTED;
723#ifdef CONFIG_CIFS_STATS2 732#ifdef CONFIG_CIFS_STATS2
@@ -948,6 +957,11 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,
948 } 957 }
949 958
950 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number); 959 rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
960 if (rc) {
961 DeleteMidQEntry(midQ);
962 mutex_unlock(&ses->server->srv_mutex);
963 return rc;
964 }
951 965
952 midQ->midState = MID_REQUEST_SUBMITTED; 966 midQ->midState = MID_REQUEST_SUBMITTED;
953#ifdef CONFIG_CIFS_STATS2 967#ifdef CONFIG_CIFS_STATS2