diff options
author | Eric Biggers <ebiggers@google.com> | 2020-04-06 23:02:40 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-04-16 16:49:22 +1000 |
commit | 01f8445e237766d4d488c0e7cec9cf8827fb41c2 (patch) | |
tree | 4fe4bef90479445dce6d37ed583a15a5c24ba087 /crypto/ecc.h | |
parent | 3278a1722acf54316ac94db3f3a83aed32857edc (diff) | |
download | linux-crypto-01f8445e237766d4d488c0e7cec9cf8827fb41c2.tar.gz linux-crypto-01f8445e237766d4d488c0e7cec9cf8827fb41c2.zip |
crypto: algapi - Avoid spurious modprobe on LOADED
Currently after any algorithm is registered and tested, there's an
unnecessary request_module("cryptomgr") even if it's already loaded.
Also, CRYPTO_MSG_ALG_LOADED is sent twice, and thus if the algorithm is
"crct10dif", lib/crc-t10dif.c replaces the tfm twice rather than once.
This occurs because CRYPTO_MSG_ALG_LOADED is sent using
crypto_probing_notify(), which tries to load "cryptomgr" if the
notification is not handled (NOTIFY_DONE). This doesn't make sense
because "cryptomgr" doesn't handle this notification.
Fix this by using crypto_notify() instead of crypto_probing_notify().
Fixes: 871e235bdcbb ("crypto: api - Introduce notifier for new crypto algorithms")
Cc: <stable@vger.kernel.org> # v4.20+
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ecc.h')
0 files changed, 0 insertions, 0 deletions