From: Corentin Labbe <clabbe@baylibre.com>
To: herbert@gondor.apana.org.au, jernej.skrabec@gmail.com,
linus.walleij@linaro.org, narmstrong@baylibre.com,
ulli.kroll@googlemail.com, wens@csie.org
Cc: linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sunxi@lists.linux.dev, Corentin Labbe <clabbe@baylibre.com>
Subject: [PATCH 5/5] crypto: engine: check if BH is disabled during completion
Date: Mon, 21 Feb 2022 12:08:33 +0000 [thread overview]
Message-ID: <20220221120833.2618733-6-clabbe@baylibre.com> (raw)
In-Reply-To: <20220221120833.2618733-1-clabbe@baylibre.com>
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 <clabbe@baylibre.com>
---
crypto/crypto_engine.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c
index fb07da9920ee..6056a990c9f2 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);
--
2.34.1
next prev parent reply other threads:[~2022-02-21 12:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 12:08 [PATCH 0/5] crypto: completion should be ran with BH disabled Corentin Labbe
2022-02-21 12:08 ` [PATCH 1/5] crypto: sun8i-ss: call finalize with bh disabled Corentin Labbe
2022-02-21 12:08 ` [PATCH 2/5] crypto: sun8i-ce: " Corentin Labbe
2022-02-21 12:08 ` [PATCH 3/5] crypto: amlogic: " Corentin Labbe
2022-02-21 12:08 ` [PATCH 4/5] crypto: gemini: " Corentin Labbe
2022-02-21 12:08 ` Corentin Labbe [this message]
2022-03-02 22:58 ` [PATCH 0/5] crypto: completion should be ran with BH disabled Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220221120833.2618733-6-clabbe@baylibre.com \
--to=clabbe@baylibre.com \
--cc=herbert@gondor.apana.org.au \
--cc=jernej.skrabec@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=narmstrong@baylibre.com \
--cc=ulli.kroll@googlemail.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox