]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: handle empty list of targets in cifs_reconnect()
authorPaulo Alcantara <pc@cjr.nz>
Tue, 21 Jul 2020 12:36:41 +0000 (09:36 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2023 08:59:59 +0000 (10:59 +0200)
commit2cc5d40e4d49ec05d01538a2a6ee8c5cd737fe2b
tree088bbf64dca8f996d129e04f55a7f4f136308c9d
parent307ffb7162821737a57cf7cb6e1d86e110be9877
cifs: handle empty list of targets in cifs_reconnect()

commit a52930353eaf443489a350a135c5525a4acbbf56 upstream.

In case there were no cached DFS referrals in
reconn_setup_dfs_targets(), set cifs_sb to NULL prior to calling
reconn_set_next_dfs_target() so it would not try to access an empty
tgt_list.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Rishabh Bhatnagar <risbhat@amazon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c