diff options
author | 2021-06-03 01:53:40 -0400 | |
---|---|---|
committer | 2021-06-11 15:03:29 +0800 | |
commit | 1b82435d17774f3eaab35dce239d354548aa9da2 (patch) | |
tree | 4121f811a7434a292843e62453ee7ddd4f145bb8 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | crypto: qce - fix error return code in qce_skcipher_async_req_handle() (diff) | |
download | wireguard-linux-1b82435d17774f3eaab35dce239d354548aa9da2.tar.xz wireguard-linux-1b82435d17774f3eaab35dce239d354548aa9da2.zip |
crypto: x86/curve25519 - fix cpu feature checking logic in mod_exit
In curve25519_mod_init() the curve25519_alg will be registered only when
(X86_FEATURE_BMI2 && X86_FEATURE_ADX). But in curve25519_mod_exit()
it still checks (X86_FEATURE_BMI2 || X86_FEATURE_ADX) when do crypto
unregister. This will trigger a BUG_ON in crypto_unregister_alg() as
alg->cra_refcnt is 0 if the cpu only supports one of X86_FEATURE_BMI2
and X86_FEATURE_ADX.
Fixes: 07b586fe0662 ("crypto: x86/curve25519 - replace with formally verified implementation")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions