WSL2-Linux-Kernel/fs/cifs
Enzo Matsumiya f0cac6cc02 cifs: return correct error in ->calc_signature()
[ Upstream commit 09a1f9a168 ]

If an error happens while getting the key or session in the
->calc_signature implementations, 0 (success) is returned. Fix it by
returning a proper error code.

Since it seems to be highly unlikely to happen wrap the rc check in
unlikely() too.

Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Fixes: 32811d242f ("cifs: Start using per session key for smb2/3 for signature generation")
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 12:35:26 +02:00
..
Kconfig
Makefile
asn1.c
cache.c
cifs_debug.c cifs: protect session channel fields with chan_lock 2022-03-08 19:12:41 +01:00
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 cifs: modefromsids must add an ACE for authenticated users 2022-03-08 19:12:30 +01:00
cifsacl.h
cifsencrypt.c
cifsfs.c cifs: fix reconnect on smb3 mount types 2022-06-14 18:36:25 +02:00
cifsfs.h cifs: fix reconnect on smb3 mount types 2022-06-14 18:36:25 +02:00
cifsglob.h cifs: version operations for smb20 unneeded when legacy support disabled 2022-06-14 18:36:24 +02:00
cifspdu.h
cifsproto.h
cifsroot.c
cifssmb.c
connect.c cifs: always initialize struct msghdr smb_msg completely 2022-09-23 14:15:48 +02:00
dfs_cache.c
dfs_cache.h
dir.c
dns_resolve.c
dns_resolve.h
export.c
file.c cifs: destage dirty pages before re-reading them for cache=none 2022-10-26 12:34:18 +02:00
fs_context.c
fs_context.h
fscache.c
fscache.h
inode.c
ioctl.c
link.c cifs: potential buffer overflow in handling symlinks 2022-04-20 09:34:13 +02:00
misc.c cifs: Fix memory leak on the deferred close 2022-08-25 11:39:56 +02:00
netlink.c
netlink.h
netmisc.c
nterr.c
nterr.h
ntlmssp.h
readdir.c
rfc1002pdu.h
sess.c cifs: fix confusing unneeded warning message on smb2.1 and earlier 2022-03-08 19:12:41 +01:00
smb1ops.c
smb2file.c
smb2glob.h
smb2inode.c SMB3: EBADF/EIO errors in rename/open caused by race condition in smb2_compound_op 2022-06-09 10:23:30 +02:00
smb2maperror.c
smb2misc.c
smb2ops.c smb3: missing inode locks in punch hole 2022-08-31 17:16:49 +02:00
smb2pdu.c smb3: must initialize two ACL struct fields to zero 2022-10-26 12:34:35 +02:00
smb2pdu.h
smb2proto.h
smb2status.h
smb2transport.c cifs: return correct error in ->calc_signature() 2022-10-26 12:35:26 +02:00
smbdirect.c
smbdirect.h
smbencrypt.c
smberr.h
trace.c
trace.h
transport.c cifs: always initialize struct msghdr smb_msg completely 2022-09-23 14:15:48 +02:00
unc.c
winucase.c
xattr.c