summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-06 16:00:53 +0100
committerSteve French <sfrench@us.ibm.com>2008-12-26 02:29:12 +0000
commit829049cbb1d2ddda2be17ea008b6b3c457808d91 (patch)
treedf237e75ddea5016ee07b68496a2d85df1301eac /fs/cifs
parent4c3130efda1ef4f28d5f26819fae2e58c3945f0b (diff)
downloadlinux-829049cbb1d2ddda2be17ea008b6b3c457808d91.tar.bz2
Check the return value of cifs_sign_smb[2]
Check the return value of cifs_sign_smb[2] Signed-off-by: Volker Lendecke <vl@samba.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-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,
return rc;
}
rc = cifs_sign_smb2(iov, n_vec, ses->server, &midQ->sequence_number);
+ if (rc) {
+ mutex_unlock(&ses->server->srv_mutex);
+ cifs_small_buf_release(in_buf);
+ goto out;
+ }
midQ->midState = MID_REQUEST_SUBMITTED;
#ifdef CONFIG_CIFS_STATS2
@@ -718,6 +723,10 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses,
}
rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
+ if (rc) {
+ mutex_unlock(&ses->server->srv_mutex);
+ goto out;
+ }
midQ->midState = MID_REQUEST_SUBMITTED;
#ifdef CONFIG_CIFS_STATS2
@@ -948,6 +957,11 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon,
}
rc = cifs_sign_smb(in_buf, ses->server, &midQ->sequence_number);
+ if (rc) {
+ DeleteMidQEntry(midQ);
+ mutex_unlock(&ses->server->srv_mutex);
+ return rc;
+ }
midQ->midState = MID_REQUEST_SUBMITTED;
#ifdef CONFIG_CIFS_STATS2