提交 37fc334c 编写于 作者: H 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: NChuck Ebbert <cebbert@redhat.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 abe5fa78
......@@ -221,7 +221,8 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
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))
request_module(tmp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册