linux-stable/fs/smb/client
Shyam Prasad N 9fb981a86a cifs: do all necessary checks for credits within or before locking
[ Upstream commit 326a8d04f1 ]

All the server credits and in-flight info is protected by req_lock.
Once the req_lock is held, and we've determined that we have enough
credits to continue, this lock cannot be dropped till we've made the
changes to credits and in-flight count.

However, we used to drop the lock in order to avoid deadlock with
the recent srv_lock. This could cause the checks already made to be
invalidated.

Fixed it by moving the server status check to before locking req_lock.

Fixes: d7d7a66aac ("cifs: avoid use of global locks for high contention data")
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>
2023-07-19 16:21:44 +02:00
..
asn1.c
cached_dir.c
cached_dir.h
cifs_debug.c
cifs_debug.h
cifs_dfs_ref.c
cifs_fs_sb.h
cifs_ioctl.h
cifs_spnego.c
cifs_spnego.h
cifs_spnego_negtokeninit.asn1
cifs_swn.c
cifs_swn.h
cifs_unicode.c
cifs_unicode.h
cifs_uniupr.h
cifsacl.c
cifsacl.h
cifsencrypt.c
cifsfs.c
cifsfs.h
cifsglob.h
cifspdu.h
cifsproto.h
cifsroot.c
cifssmb.c
connect.c
dfs_cache.c
dfs_cache.h
dir.c
dns_resolve.c
dns_resolve.h
export.c
file.c
fs_context.c
fs_context.h
fscache.c
fscache.h
inode.c
ioctl.c
Kconfig
link.c
Makefile
misc.c
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c
smb1ops.c
smb2file.c
smb2glob.h
smb2inode.c cifs: prevent use-after-free by freeing the cfile later 2023-07-19 16:21:44 +02:00
smb2maperror.c
smb2misc.c
smb2ops.c cifs: do all necessary checks for credits within or before locking 2023-07-19 16:21:44 +02:00
smb2pdu.c
smb2pdu.h
smb2proto.h
smb2status.h
smb2transport.c
smbdirect.c
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h
transport.c cifs: do all necessary checks for credits within or before locking 2023-07-19 16:21:44 +02:00
unc.c
winucase.c
xattr.c