]> git.itanic.dy.fi Git - linux-stable/commit
cifs: return errors during session setup during reconnects
authorShyam Prasad N <sprasad@microsoft.com>
Tue, 31 May 2022 12:31:05 +0000 (12:31 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:45:16 +0000 (18:45 +0200)
commite922b1df2672e76d19872831cd6840eeb3b9aacf
tree422a4fe7b9b002d153a2e5ab86bb3be308c58fa2
parent7aabf07bb0063452f4c2e973ea39ee0d972aa8ee
cifs: return errors during session setup during reconnects

commit 8ea21823aa584b55ba4b861307093b78054b0c1b upstream.

During reconnects, we check the return value from
cifs_negotiate_protocol, and have handlers for both success
and failures. But if that passes, and cifs_setup_session
returns any errors other than -EACCES, we do not handle
that. This fix adds a handler for that, so that we don't
go ahead and try a tree_connect on a failed session.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2pdu.c