]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
CIFS: Fix some return values in case of error in 'crypt_message'
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Sun, 11 Jun 2017 07:12:47 +0000 (09:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Jun 2017 11:02:48 +0000 (13:02 +0200)
commit4eec15d336aab2a7133859c2e9270809c5a66b08
tree991f7b491a7cb6afa22a69443b0098330e9406f3
parentdcaa5a53ccfd82c1a0c152ac771381a83e7a65e0
CIFS: Fix some return values in case of error in 'crypt_message'

commit 517a6e43c4872c89794af5b377fa085e47345952 upstream.

'rc' is known to be 0 at this point. So if 'init_sg' or 'kzalloc' fails, we
should return -ENOMEM instead.

Also remove a useless 'rc' in a debug message as it is meaningless here.

Fixes: 026e93dc0a3ee ("CIFS: Encrypt SMB3 requests before sending")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2ops.c