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

Configure Feed

Select the types of activity you want to include in your feed.

crypto: sun8i-ss - call finalize with bh disabled

Doing ipsec produces a spinlock recursion warning.
This is due to not disabling BH during crypto completion function.

Fixes: f08fcced6d00 ("crypto: allwinner - Add sun8i-ss cryptographic offloader")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Corentin Labbe and committed by
Herbert Xu
b169b376 2f5ee72e

+6
+3
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
··· 11 11 * You could find a link for the datasheet in Documentation/arm/sunxi.rst 12 12 */ 13 13 14 + #include <linux/bottom_half.h> 14 15 #include <linux/crypto.h> 15 16 #include <linux/dma-mapping.h> 16 17 #include <linux/io.h> ··· 275 274 struct skcipher_request *breq = container_of(areq, struct skcipher_request, base); 276 275 277 276 err = sun8i_ss_cipher(breq); 277 + local_bh_disable(); 278 278 crypto_finalize_skcipher_request(engine, breq, err); 279 + local_bh_enable(); 279 280 280 281 return 0; 281 282 }
+3
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
··· 9 9 * 10 10 * You could find the datasheet in Documentation/arm/sunxi.rst 11 11 */ 12 + #include <linux/bottom_half.h> 12 13 #include <linux/dma-mapping.h> 13 14 #include <linux/pm_runtime.h> 14 15 #include <linux/scatterlist.h> ··· 443 442 theend: 444 443 kfree(pad); 445 444 kfree(result); 445 + local_bh_disable(); 446 446 crypto_finalize_hash_request(engine, breq, err); 447 + local_bh_enable(); 447 448 return 0; 448 449 }