s390/zcrypt: fix kmalloc 256k failure
authorHarald Freudenberger <freude@linux.ibm.com>
Wed, 9 Sep 2020 09:59:43 +0000 (11:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 11:00:02 +0000 (13:00 +0200)
commitbe0291fc11e174991e56c5bf425f2f3ae26d449b
treee037279f6702e2698d44dfdfc1d76124ac650f08
parent6042dcf5b872e1d090dead22556375e0034b8083
s390/zcrypt: fix kmalloc 256k failure

commit b6186d7fb53349efd274263a45f0b08749ccaa2d upstream.

Tests showed that under stress conditions the kernel may
temporary fail to allocate 256k with kmalloc. However,
this fix reworks the related code in the cca_findcard2()
function to use kvmalloc instead.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@linux.ibm.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/crypto/zcrypt_ccamisc.c