mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user