Commit 37fc334c authored by Herbert Xu's avatar Herbert Xu

crypto: api - Fix algorithm module auto-loading

The commit a760a665 (crypto:
api - Fix module load deadlock with fallback algorithms) broke
the auto-loading of algorithms that require fallbacks.  The
problem is that the fallback mask check is missing an and which
cauess bits that should be considered to interfere with the
result.
Reported-by: default avatarChuck Ebbert <cebbert@redhat.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent abe5fa78
...@@ -221,7 +221,8 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask) ...@@ -221,7 +221,8 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
request_module(name); request_module(name);
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask) && if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
CRYPTO_ALG_NEED_FALLBACK) &&
snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp)) snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
request_module(tmp); request_module(tmp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment