diff options
author | Eric Biggers <ebiggers@google.com> | 2020-04-07 09:02:40 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-04-16 09:49:22 +0300 |
commit | beeb460cd12ac9b91640b484b6a52dcba9d9fc8f (patch) | |
tree | 960e172190cd68e1c4cb21024383afc0bc8379c0 /fs/super.c | |
parent | 56b80bdee4a16cf330562801667a1e62fe7b9255 (diff) | |
download | linux-beeb460cd12ac9b91640b484b6a52dcba9d9fc8f.tar.xz |
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: dd8b083f9a5e ("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 'fs/super.c')
0 files changed, 0 insertions, 0 deletions