aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/aead.c
diff options
context:
space:
mode:
authorSteffen Klassert <steffen.klassert@secunet.com>2012-03-29 03:03:47 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2012-03-29 07:52:47 -0400
commit1e1229940045a537c61fb69f86010a8774e576d0 (patch)
tree3a594eef2d1cda7e49f7b62f70853d6f6a021d61 /crypto/aead.c
parentfbf0ca1bf852fe224cec5400a69cd755ddc4ddcb (diff)
crypto: user - Fix lookup of algorithms with IV generator
We lookup algorithms with crypto_alg_mod_lookup() when instantiating via crypto_add_alg(). However, algorithms that are wrapped by an IV genearator (e.g. aead or genicv type algorithms) need special care. The userspace process hangs until it gets a timeout when we use crypto_alg_mod_lookup() to lookup these algorithms. So export the lookup functions for these algorithms and use them in crypto_add_alg(). Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/aead.c')
-rw-r--r--crypto/aead.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index 04add3dca6fe..e4cb35159be4 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -470,8 +470,7 @@ out:
470 return err; 470 return err;
471} 471}
472 472
473static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, 473struct crypto_alg *crypto_lookup_aead(const char *name, u32 type, u32 mask)
474 u32 mask)
475{ 474{
476 struct crypto_alg *alg; 475 struct crypto_alg *alg;
477 476
@@ -503,6 +502,7 @@ static struct crypto_alg *crypto_lookup_aead(const char *name, u32 type,
503 502
504 return ERR_PTR(crypto_nivaead_default(alg, type, mask)); 503 return ERR_PTR(crypto_nivaead_default(alg, type, mask));
505} 504}
505EXPORT_SYMBOL_GPL(crypto_lookup_aead);
506 506
507int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name, 507int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name,
508 u32 type, u32 mask) 508 u32 type, u32 mask)