crypto: shash - Allow cloning on algorithms with no init_tfm
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 May 2023 09:04:04 +0000 (17:04 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 24 May 2023 10:12:33 +0000 (18:12 +0800)
commitb7be31b0d5088507b745bfa014798e52fad6dc7a
treedf257538a796e23a06638e8bed8b57ef8d5534f4
parented51bba18f563594b5ddf7aaa5fd61abe5e474ae
crypto: shash - Allow cloning on algorithms with no init_tfm

Some shash algorithms are so simple that they don't have an init_tfm
function.  These can be cloned trivially.  Check this before failing
in crypto_clone_shash.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/shash.c