diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-23 17:22:31 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-04-28 19:40:54 +0800 |
commit | 2cfe41630a1a4f24d46825aa9656a51a38fb7f7d (patch) | |
tree | 83c10c5937f5fc7e788ef1a37de2353b975d4b21 /crypto/api.c | |
parent | 19da081a28c95fe9b03ce952a2bf4a6f6bf5112c (diff) |
crypto: hash - Fix clone error handling
Do not copy the exit function in crypto_clone_tfm as it should
only be set after init_tfm or clone_tfm has succeeded.
Move the setting into crypto_clone_ahash and crypto_clone_shash
instead.
Also clone the fb if necessary.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/api.c')
-rw-r--r-- | crypto/api.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/api.c b/crypto/api.c index 172e82f79c69..5cd5ec105bb1 100644 --- a/crypto/api.c +++ b/crypto/api.c @@ -570,7 +570,7 @@ void *crypto_clone_tfm(const struct crypto_type *frontend, tfm = (struct crypto_tfm *)(mem + frontend->tfmsize); tfm->crt_flags = otfm->crt_flags; - tfm->exit = otfm->exit; + tfm->fb = tfm; out: return mem; |