crypto: gemini - call finalize with bh disabled
authorCorentin Labbe <clabbe@baylibre.com>
Mon, 21 Feb 2022 12:08:32 +0000 (12:08 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 2 Mar 2022 22:47:49 +0000 (10:47 +1200)
Doing ipsec produces a spinlock recursion warning.
This is due to not disabling BH during crypto completion function.

Fixes: 46c5338db7bd45b2 ("crypto: sl3516 - Add sl3516 crypto engine")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/gemini/sl3516-ce-cipher.c

index 53e3fefb81de5ebdba9c315fc8dba3f52cdf6d3d..14d0d83d388d8e2765a92a12d26df871441ec5f1 100644 (file)
@@ -264,7 +264,9 @@ static int sl3516_ce_handle_cipher_request(struct crypto_engine *engine, void *a
        struct skcipher_request *breq = container_of(areq, struct skcipher_request, base);
 
        err = sl3516_ce_cipher(breq);
+       local_bh_disable();
        crypto_finalize_skcipher_request(engine, breq, err);
+       local_bh_enable();
 
        return 0;
 }