From: Corentin Labbe Date: Mon, 21 Feb 2022 12:08:33 +0000 (+0000) Subject: crypto: engine - check if BH is disabled during completion X-Git-Tag: v6.1-rc5~1660^2~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4058cf08945c18a6de193f4118fd05d83d3d4285;p=platform%2Fkernel%2Flinux-starfive.git crypto: engine - check if BH is disabled during completion When doing iperf over ipsec with crypto hardware sun8i-ce, I hit some spinlock recursion bug. This is due to completion function called with enabled BH. Add check a to detect this. Fixes: 735d37b5424b ("crypto: engine - Introduce the block request crypto engine framework") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu --- diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c index fb07da9..6056a99 100644 --- a/crypto/crypto_engine.c +++ b/crypto/crypto_engine.c @@ -53,6 +53,7 @@ static void crypto_finalize_request(struct crypto_engine *engine, dev_err(engine->dev, "failed to unprepare request\n"); } } + lockdep_assert_in_softirq(); req->complete(req, err); kthread_queue_work(engine->kworker, &engine->pump_requests);