Skip to content

Commit 37fc334

Browse files
committed
crypto: api - Fix algorithm module auto-loading
The commit a760a66 (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: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent abe5fa7 commit 37fc334

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎crypto/api.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ struct crypto_alg *crypto_larval_lookup(const char *name, u32 type, u32 mask)
221221

222222
request_module(name);
223223

224-
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask) &&
224+
if (!((type ^ CRYPTO_ALG_NEED_FALLBACK) & mask &
225+
CRYPTO_ALG_NEED_FALLBACK) &&
225226
snprintf(tmp, sizeof(tmp), "%s-all", name) < sizeof(tmp))
226227
request_module(tmp);
227228

0 commit comments

Comments
 (0)