]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack
authorAndy Lutomirski <luto@kernel.org>
Mon, 12 Dec 2016 20:54:37 +0000 (12:54 -0800)
committerSteve French <smfrench@gmail.com>
Wed, 14 Dec 2016 07:44:16 +0000 (01:44 -0600)
commitc84164af56cf56ec48c6522e0f5382ea2e0a77d3
tree372862541646467a01b521e5e4328143036268ed
parente55e53a0951a7a5e1116fa90e54c85f4637c3740
cifs: Fix smbencrypt() to stop pointing a scatterlist at the stack

smbencrypt() points a scatterlist to the stack, which is breaks if
CONFIG_VMAP_STACK=y.

Fix it by switching to crypto_cipher_encrypt_one().  The new code
should be considerably faster as an added benefit.

This code is nearly identical to some code that Eric Biggers
suggested.

Cc: stable@vger.kernel.org # 4.9 only
Reported-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/smbencrypt.c