diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2024-08-17 09:58:35 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-08-24 16:39:15 +0300 |
commit | 3c44d31cb34ce4eb8311a2e73634d57702948230 (patch) | |
tree | d3a96b691755d8744c5aafd5b0377905d9f3012a /arch/arm/crypto/aes-neonbs-glue.c | |
parent | 37da5d0ffa7b61f79156fbbd3369f17b9a1638bd (diff) | |
download | linux-3c44d31cb34ce4eb8311a2e73634d57702948230.tar.xz |
crypto: simd - Do not call crypto_alloc_tfm during registration
Algorithm registration is usually carried out during module init,
where as little work as possible should be carried out. The SIMD
code violated this rule by allocating a tfm, this then triggers a
full test of the algorithm which may dead-lock in certain cases.
SIMD is only allocating the tfm to get at the alg object, which is
in fact already available as it is what we are registering. Use
that directly and remove the crypto_alloc_tfm call.
Also remove some obsolete and unused SIMD API.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm/crypto/aes-neonbs-glue.c')
-rw-r--r-- | arch/arm/crypto/aes-neonbs-glue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/crypto/aes-neonbs-glue.c b/arch/arm/crypto/aes-neonbs-glue.c index fd04f855b2f5..f6be80b5938b 100644 --- a/arch/arm/crypto/aes-neonbs-glue.c +++ b/arch/arm/crypto/aes-neonbs-glue.c @@ -491,7 +491,7 @@ static int __init aes_init(void) algname = aes_algs[i].base.cra_name + 2; drvname = aes_algs[i].base.cra_driver_name + 2; basename = aes_algs[i].base.cra_driver_name; - simd = simd_skcipher_create_compat(algname, drvname, basename); + simd = simd_skcipher_create_compat(aes_algs + i, algname, drvname, basename); err = PTR_ERR(simd); if (IS_ERR(simd)) goto unregister_simds; |