Skip to content

Commit ac615db

Browse files
sprasad-microsoftSteve French
authored andcommitted
cifs: log session id when a matching ses is not found
We do not log the session id in crypt_setup when a matching session is not found. Printing the session id helps debugging here. This change does just that. This change also changes this log to FYI, since it is normal to see then during a reconnect. Doing the same for a similar log in case of signed connections. The plan is to have a tracepoint for this event, so that we will be able to see this event if need be. That will be done as another change. Signed-off-by: Shyam Prasad N <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 5f2a0af commit ac615db

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

fs/smb/client/smb2ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4444,8 +4444,8 @@ crypt_message(struct TCP_Server_Info *server, int num_rqst,
44444444

44454445
rc = smb2_get_enc_key(server, le64_to_cpu(tr_hdr->SessionId), enc, key);
44464446
if (rc) {
4447-
cifs_server_dbg(VFS, "%s: Could not get %scryption key\n", __func__,
4448-
enc ? "en" : "de");
4447+
cifs_server_dbg(FYI, "%s: Could not get %scryption key. sid: 0x%llx\n", __func__,
4448+
enc ? "en" : "de", le64_to_cpu(tr_hdr->SessionId));
44494449
return rc;
44504450
}
44514451

fs/smb/client/smb2transport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ int smb2_get_sign_key(__u64 ses_id, struct TCP_Server_Info *server, u8 *key)
9292
if (ses->Suid == ses_id)
9393
goto found;
9494
}
95-
cifs_server_dbg(VFS, "%s: Could not find session 0x%llx\n",
95+
cifs_server_dbg(FYI, "%s: Could not find session 0x%llx\n",
9696
__func__, ses_id);
9797
rc = -ENOENT;
9898
goto out;
@@ -564,7 +564,7 @@ smb3_calc_signature(struct smb_rqst *rqst, struct TCP_Server_Info *server,
564564

565565
rc = smb2_get_sign_key(le64_to_cpu(shdr->SessionId), server, key);
566566
if (unlikely(rc)) {
567-
cifs_server_dbg(VFS, "%s: Could not get signing key\n", __func__);
567+
cifs_server_dbg(FYI, "%s: Could not get signing key\n", __func__);
568568
return rc;
569569
}
570570

0 commit comments

Comments
 (0)