summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/transport.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index 70412944b267..59643acb6d67 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -891,9 +891,12 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
/*
* Compounding is never used during session establish.
*/
- if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP))
+ if ((ses->status == CifsNew) || (optype & CIFS_NEG_OP)) {
+ mutex_lock(&ses->server->srv_mutex);
smb311_update_preauth_hash(ses, rqst[0].rq_iov,
rqst[0].rq_nvec);
+ mutex_unlock(&ses->server->srv_mutex);
+ }
if (timeout == CIFS_ASYNC_OP)
goto out;
@@ -964,7 +967,9 @@ compound_send_recv(const unsigned int xid, struct cifs_ses *ses,
.iov_base = resp_iov[0].iov_base,
.iov_len = resp_iov[0].iov_len
};
+ mutex_lock(&ses->server->srv_mutex);
smb311_update_preauth_hash(ses, &iov, 1);
+ mutex_unlock(&ses->server->srv_mutex);
}
out: