cifs: prevent data race in smb2_reconnect()
authorPaulo Alcantara <pc@cjr.nz>
Mon, 30 Jan 2023 23:33:29 +0000 (20:33 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 20 Feb 2023 17:48:48 +0000 (11:48 -0600)
commit3c0070f54b3128de498c2dd9934a21f0dd867111
tree115759dc2568311988bf02bfa72e52388ca3f163
parent77e3f338df79b4584ec4a518e43db38455a6dfb3
cifs: prevent data race in smb2_reconnect()

Make sure to get an up-to-date TCP_Server_Info::nr_targets value prior
to waiting the server to be reconnected in smb2_reconnect().  It is
set in cifs_tcp_ses_needs_reconnect() and protected by
TCP_Server_Info::srv_lock.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c