Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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é <maxime.mere@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Maxime Méré and committed by
Herbert Xu
56ddb9aa 40277252

+5 -1
+5 -1
drivers/crypto/stm32/stm32-cryp.c
··· 11 11 #include <crypto/internal/des.h> 12 12 #include <crypto/internal/skcipher.h> 13 13 #include <crypto/scatterwalk.h> 14 + #include <linux/bottom_half.h> 14 15 #include <linux/clk.h> 15 16 #include <linux/delay.h> 16 17 #include <linux/dma-mapping.h> ··· 2204 2203 it_mask &= ~IMSCR_OUT; 2205 2204 stm32_cryp_write(cryp, cryp->caps->imsc, it_mask); 2206 2205 2207 - if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) 2206 + if (!cryp->payload_in && !cryp->header_in && !cryp->payload_out) { 2207 + local_bh_disable(); 2208 2208 stm32_cryp_finish_req(cryp, 0); 2209 + local_bh_enable(); 2210 + } 2209 2211 2210 2212 return IRQ_HANDLED; 2211 2213 }