Skip to content

Commit 1913e11

Browse files
ematsumiyasmfrench
authored andcommitted
cifs: fix hang on cifs_get_next_mid()
Mount will hang if using SMB1 and DFS. This is because every call to get_next_mid() will, unconditionally, mark tcpStatus to CifsNeedReconnect before even establishing the initial connect, because "reconnect" variable was not initialized. Initializing "reconnect" to false fix this issue. Fixes: 220c5bc ("cifs: take cifs_tcp_ses_lock for status checks") Signed-off-by: Enzo Matsumiya <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 080dc5e commit 1913e11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/smb1ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ cifs_get_next_mid(struct TCP_Server_Info *server)
163163
{
164164
__u64 mid = 0;
165165
__u16 last_mid, cur_mid;
166-
bool collision, reconnect;
166+
bool collision, reconnect = false;
167167

168168
spin_lock(&GlobalMid_Lock);
169169

0 commit comments

Comments
 (0)