crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 17 Jun 2020 13:48:56 +0000 (09:48 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 07:48:14 +0000 (09:48 +0200)
commita2c4136587cf19066758091eb60694a8f5120897
treee8edcc458bbee9a3ecb17e704b01e7d50024b862
parent99e69b921dae3ebe63d2c424ce00f91b4cab2826
crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified

commit 9e27c99104707f083dccd3b4d79762859b5a0614 upstream.

There is this call chain:
cvm_encrypt -> cvm_enc_dec -> cptvf_do_request -> process_request -> kzalloc
where we call sleeping allocator function even if CRYPTO_TFM_REQ_MAY_SLEEP
was not specified.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org # v4.11+
Fixes: c694b233295b ("crypto: cavium - Add the Virtual Function driver for CPT")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/cavium/cpt/cptvf_algs.c
drivers/crypto/cavium/cpt/cptvf_reqmanager.c
drivers/crypto/cavium/cpt/request_manager.h