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: tegra - Disable softirqs before finalizing request

Softirqs must be disabled when calling the finalization fucntion on
a request.

Reported-by: Guangwu Zhang <guazhang@redhat.com>
Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+12
+9
drivers/crypto/tegra/tegra-se-aes.c
··· 4 4 * Crypto driver to handle block cipher algorithms using NVIDIA Security Engine. 5 5 */ 6 6 7 + #include <linux/bottom_half.h> 7 8 #include <linux/clk.h> 8 9 #include <linux/dma-mapping.h> 9 10 #include <linux/module.h> ··· 334 333 tegra_key_invalidate_reserved(ctx->se, key2_id, ctx->alg); 335 334 336 335 out_finalize: 336 + local_bh_disable(); 337 337 crypto_finalize_skcipher_request(se->engine, req, ret); 338 + local_bh_enable(); 338 339 339 340 return 0; 340 341 } ··· 1264 1261 tegra_key_invalidate_reserved(ctx->se, rctx->key_id, ctx->alg); 1265 1262 1266 1263 out_finalize: 1264 + local_bh_disable(); 1267 1265 crypto_finalize_aead_request(ctx->se->engine, req, ret); 1266 + local_bh_enable(); 1268 1267 1269 1268 return 0; 1270 1269 } ··· 1352 1347 tegra_key_invalidate_reserved(ctx->se, rctx->key_id, ctx->alg); 1353 1348 1354 1349 out_finalize: 1350 + local_bh_disable(); 1355 1351 crypto_finalize_aead_request(ctx->se->engine, req, ret); 1352 + local_bh_enable(); 1356 1353 1357 1354 return 0; 1358 1355 } ··· 1752 1745 if (tegra_key_is_reserved(rctx->key_id)) 1753 1746 tegra_key_invalidate_reserved(ctx->se, rctx->key_id, ctx->alg); 1754 1747 1748 + local_bh_disable(); 1755 1749 crypto_finalize_hash_request(se->engine, req, ret); 1750 + local_bh_enable(); 1756 1751 1757 1752 return 0; 1758 1753 }
+3
drivers/crypto/tegra/tegra-se-hash.c
··· 4 4 * Crypto driver to handle HASH algorithms using NVIDIA Security Engine. 5 5 */ 6 6 7 + #include <linux/bottom_half.h> 7 8 #include <linux/clk.h> 8 9 #include <linux/dma-mapping.h> 9 10 #include <linux/module.h> ··· 547 546 } 548 547 549 548 out: 549 + local_bh_disable(); 550 550 crypto_finalize_hash_request(se->engine, req, ret); 551 + local_bh_enable(); 551 552 552 553 return 0; 553 554 }