]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: make sure server interfaces are requested only for SMB3+
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 13 Mar 2024 10:40:41 +0000 (10:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:34 +0000 (15:28 +0200)
commit66c2940c9614ffc7f022f3ae294411ca7cf122c8
tree435d0e2ef37f2b67b10922359810e3035f2f2ac6
parent407ced4e770eb6d1b2fcc91a3782a37a1198db11
cifs: make sure server interfaces are requested only for SMB3+

[ Upstream commit 13c0a74747cb7fdadf58c5d3a7d52cfca2d51736 ]

Some code paths for querying server interfaces make a false
assumption that it will only get called for SMB3+. Since this
function now can get called from a generic code paths, the correct
thing to do is to have specific handler for this functionality
per SMB dialect, and call this handler.

This change adds such a handler and implements this handler only
for SMB 3.0 and 3.1.1.

Cc: stable@vger.kernel.org
Cc: Jan Čermák <sairon@sairon.cz>
Reported-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifsglob.h
fs/smb/client/connect.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c