crypto: testmgr - Use kmalloc memory for RSA input
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 5 May 2016 08:42:49 +0000 (16:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2016 01:35:09 +0000 (18:35 -0700)
commit04706e53238a1b4b5bc07cac93265ca2a0992cb8
tree6e334b240b0a0dd75d4b550e436dc2459b3a0c9d
parentafd96c1fffcd9040b446213a604d43b24734d0ad
crypto: testmgr - Use kmalloc memory for RSA input

commit df27b26f04ed388ff4cc2b5d8cfdb5d97678816f upstream.

As akcipher uses an SG interface, you must not use vmalloc memory
as input for it.  This patch fixes testmgr to copy the vmalloc
test vectors to kmalloc memory before running the test.

This patch also removes a superfluous sg_virt call in do_test_rsa.

Reported-by: Anatoly Pugachev <matorola@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/testmgr.c