From: Maxime Méré Date: Tue, 28 May 2024 14:05:48 +0000 (+0200) Subject: crypto: stm32/cryp - call finalize with bh disabled X-Git-Tag: v6.11-rc1~119^2~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56ddb9aa3b324c2d9645b5a7343e46010cf3f6ce;p=thirdparty%2Fkernel%2Flinux.git crypto: stm32/cryp - call finalize with bh disabled The finalize operation in interrupt mode produce a produces a spinlock recursion warning. The reason is the fact that BH must be disabled during this process. Signed-off-by: Maxime Méré Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/stm32/stm32-cryp.c b/drivers/crypto/stm32/stm32-cryp.c index 445276b848ed0..937f6dab8955e 100644 --- a/drivers/crypto/stm32/stm32-cryp.c +++ b/drivers/crypto/stm32/stm32-cryp.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -2203,8 +2204,11 @@ static irqreturn_t stm32_cryp_irq_thread(int irq, void *arg) it_mask &= ~IMSCR_OUT; stm32_cryp_write(cryp, cryp->caps->imsc, it_mask); - if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) + if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) { + local_bh_disable(); stm32_cryp_finish_req(cryp, 0); + local_bh_enable(); + } return IRQ_HANDLED; }