]> 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)
commit21e2a5e949243423094661295ab0365470e0690d
tree4abc165240c6f48044e475c58609202fb5fe16a4
parentcee9d44c982955410d2114f4b99891161253787a
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: e5a1b6779b656 ("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