summaryrefslogtreecommitdiff
path: root/fs/cifs/smb1ops.c
diff options
context:
space:
mode:
authorEnzo Matsumiya <ematsumiya@suse.de>2022-01-08 01:51:39 +0300
committerSteve French <stfrench@microsoft.com>2022-01-08 05:07:11 +0300
commit1913e1116a3174648cf2e6faedf29204f31cc438 (patch)
tree7da7b06bfe4b3231e6610a66b9debb4885f64c86 /fs/cifs/smb1ops.c
parent080dc5e5656c1cc1cdefb501b9b645a07519f763 (diff)
downloadlinux-1913e1116a3174648cf2e6faedf29204f31cc438.tar.xz
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: 220c5bc25d87 ("cifs: take cifs_tcp_ses_lock for status checks") Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r--fs/cifs/smb1ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index 54319a789c92..6364c09296e8 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -163,7 +163,7 @@ cifs_get_next_mid(struct TCP_Server_Info *server)
{
__u64 mid = 0;
__u16 last_mid, cur_mid;
- bool collision, reconnect;
+ bool collision, reconnect = false;
spin_lock(&GlobalMid_Lock);