[PATCH 2/2] [SMB3] Avoid possible deadlock in previous patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Steve French <steve.french@xxxxxxxxxxxxxxx>
---
 fs/cifs/smb2pdu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 4030cbd..f2cbb28 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -1831,8 +1831,11 @@ SMB2_echo(struct TCP_Server_Info *server)
 				tcon = list_entry(tmp2, struct cifs_tcon,
 						  tcon_list);
 				/* add check for persistent handle reconnect */
-				if (tcon && tcon->need_reconnect)
+				if (tcon && tcon->need_reconnect) {
+					spin_unlock(&cifs_tcp_ses_lock);
 					rc = smb2_reconnect(SMB2_ECHO, tcon);
+					spin_lock(&cifs_tcp_ses_lock);
+				}
 			}
 		}
 		spin_unlock(&cifs_tcp_ses_lock);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux