Skip to content

Commit 02c4187

Browse files
ematsumiyaSteve French
authored andcommitted
smb: client: fix deadlock in smb2_find_smb_tcon()
Unlock cifs_tcp_ses_lock before calling cifs_put_smb_ses() to avoid such deadlock. Cc: [email protected] Signed-off-by: Enzo Matsumiya <[email protected]> Reviewed-by: Shyam Prasad N <[email protected]> Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent c3f38fa commit 02c4187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/smb2transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ smb2_find_smb_tcon(struct TCP_Server_Info *server, __u64 ses_id, __u32 tid)
216216
}
217217
tcon = smb2_find_smb_sess_tcon_unlocked(ses, tid);
218218
if (!tcon) {
219-
cifs_put_smb_ses(ses);
220219
spin_unlock(&cifs_tcp_ses_lock);
220+
cifs_put_smb_ses(ses);
221221
return NULL;
222222
}
223223
spin_unlock(&cifs_tcp_ses_lock);

0 commit comments

Comments
 (0)