]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: return correct error in ->calc_signature()
authorEnzo Matsumiya <ematsumiya@suse.de>
Fri, 16 Sep 2022 23:57:05 +0000 (20:57 -0300)
committerSteve French <stfrench@microsoft.com>
Sun, 25 Sep 2022 22:01:50 +0000 (17:01 -0500)
commitbf7aca128c66ffc6b3cc015d619a60a5910322c9
tree28bed485e4085f75631588ecd27bc8429fb8f9a4
parent1418b71665fea5a11cbfc99f300ed494f1eec3be
cifs: return correct error in ->calc_signature()

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: 8f94dc629c5b ("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>
fs/cifs/smb2transport.c