aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crypto/algapi.c4
-rw-r--r--crypto/api.c8
-rw-r--r--crypto/internal.h2
3 files changed, 6 insertions, 8 deletions
diff --git a/crypto/algapi.c b/crypto/algapi.c
index e65cb50cf4a..e9154c1347c 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -27,9 +27,7 @@ void crypto_larval_error(const char *name, u32 type, u32 mask)
{
struct crypto_alg *alg;
- down_read(&crypto_alg_sem);
- alg = __crypto_alg_lookup(name, type, mask);
- up_read(&crypto_alg_sem);
+ alg = crypto_alg_lookup(name, type, mask);
if (alg) {
if (crypto_is_larval(alg)) {
diff --git a/crypto/api.c b/crypto/api.c
index d06e33270ab..0906cedd452 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -55,7 +55,8 @@ void crypto_mod_put(struct crypto_alg *alg)
}
EXPORT_SYMBOL_GPL(crypto_mod_put);
-struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask)
+static struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type,
+ u32 mask)
{
struct crypto_alg *q, *alg = NULL;
int best = -2;
@@ -92,7 +93,6 @@ struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask)
return alg;
}
-EXPORT_SYMBOL_GPL(__crypto_alg_lookup);
static void crypto_larval_destroy(struct crypto_alg *alg)
{
@@ -165,8 +165,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
return alg;
}
-static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type,
- u32 mask)
+struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask)
{
struct crypto_alg *alg;
@@ -176,6 +175,7 @@ static struct crypto_alg *crypto_alg_lookup(const char *name, u32 type,
return alg;
}
+EXPORT_SYMBOL_GPL(crypto_alg_lookup);
struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
{
diff --git a/crypto/internal.h b/crypto/internal.h
index 683fcb2d91f..6d8d2131058 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -82,7 +82,7 @@ static inline unsigned int crypto_compress_ctxsize(struct crypto_alg *alg)
}
struct crypto_alg *crypto_mod_get(struct crypto_alg *alg);
-struct crypto_alg *__crypto_alg_lookup(const char *name, u32 type, u32 mask);
+struct crypto_alg *crypto_alg_lookup(const char *name, u32 type, u32 mask);
struct crypto_alg *crypto_alg_mod_lookup(const char *name, u32 type, u32 mask);
int crypto_init_digest_ops(struct crypto_tfm *tfm);