smb: client: fix hang in wait_for_response() for negproto
authorPaulo Alcantara <pc@manguebit.com>
Sun, 1 Sep 2024 00:40:28 +0000 (21:40 -0300)
committerSteve French <stfrench@microsoft.com>
Tue, 3 Sep 2024 01:00:04 +0000 (20:00 -0500)
commit7ccc1465465d78e6411b7bd730d06e7435802b5c
treedb87aec2f7fbb90ec6d06fce3b1d918ba405dffe
parent431c1646e1f86b949fa3685efc50b660a364c2b6
smb: client: fix hang in wait_for_response() for negproto

Call cifs_reconnect() to wake up processes waiting on negotiate
protocol to handle the case where server abruptly shut down and had no
chance to properly close the socket.

Simple reproducer:

  ssh 192.168.2.100 pkill -STOP smbd
  mount.cifs //192.168.2.100/test /mnt -o ... [never returns]

Cc: Rickard Andersson <rickaran@axis.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/connect.c