aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-06-06 15:40:23 -0400
committerSteve French <sfrench@us.ibm.com>2011-06-06 20:57:05 -0400
commit9c4843ea576107a3c1fb94f2f758f198e9fe9e54 (patch)
tree3860494ee8307b603a654e8f43685943974f7171 /fs/cifs
parent243e2dd38e1b322b29a1714034cc60b84d3d5e07 (diff)
cifs: silence printk when establishing first session on socket
When signing is enabled, the first session that's established on a socket will cause a printk like this to pop: CIFS VFS: Unexpected SMB signature This is because the key exchange hasn't happened yet, so the signature field is bogus. Don't try to check the signature on the socket until the first session has been established. Also, eliminate the specific check for SMB_COM_NEGOTIATE since this check covers that case too. Cc: stable@kernel.org Cc: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/cifsencrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index dfbd9f1f373d..5a0ee7f2af06 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -184,7 +184,7 @@ int cifs_verify_signature(struct smb_hdr *cifs_pdu,
184 if (cifs_pdu == NULL || server == NULL) 184 if (cifs_pdu == NULL || server == NULL)
185 return -EINVAL; 185 return -EINVAL;
186 186
187 if (cifs_pdu->Command == SMB_COM_NEGOTIATE) 187 if (!server->session_estab)
188 return 0; 188 return 0;
189 189
190 if (cifs_pdu->Command == SMB_COM_LOCKING_ANDX) { 190 if (cifs_pdu->Command == SMB_COM_LOCKING_ANDX) {