Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);