crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 17 Jun 2020 13:49:52 +0000 (09:49 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jun 2020 04:46:42 +0000 (14:46 +1000)
commit5ead051780404b5cb22147170acadd1994dc3236
tree02f906e3f4596538bd09df3a4457e54c2b7c4bc8
parent9e27c99104707f083dccd3b4d79762859b5a0614
crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified

There is this call chain:
sec_alg_skcipher_encrypt -> sec_alg_skcipher_crypto ->
sec_alg_alloc_and_calc_split_sizes -> kcalloc
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.19+
Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver")
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/sec/sec_algs.c