]> git.baikalelectronics.ru Git - kernel.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)
committerSteve French <smfrench@gmail.com>
Wed, 21 Jun 2017 05:09:28 +0000 (00:09 -0500)
commit517a6e43c4872c89794af5b377fa085e47345952
tree4abc165240c6f48044e475c58609202fb5fe16a4
parente125f5284f81bbb765a504494622b45c02faf978
CIFS: Fix some return values in case of error in 'crypt_message'

'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>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c