On Fri, Jul 05, 2024 at 10:42:52PM +0530, Pavitrakumar M wrote: > > +static int spacc_hash_cra_init(struct crypto_tfm *tfm) > +{ > + const struct spacc_alg *salg = spacc_tfm_ahash(tfm); > + struct spacc_crypto_ctx *tctx = crypto_tfm_ctx(tfm); > + struct spacc_priv *priv = NULL; > + > + tctx->handle = -1; > + tctx->ctx_valid = false; > + tctx->dev = get_device(salg->dev[0]); > + > + if (salg->mode->sw_fb) { > + tctx->fb.hash = crypto_alloc_ahash(salg->calg->cra_name, 0, > + CRYPTO_ALG_NEED_FALLBACK); > + > + if (IS_ERR(tctx->fb.hash)) { > + if (tctx->handle >= 0) > + spacc_close(&priv->spacc, tctx->handle); > + put_device(tctx->dev); > + return PTR_ERR(tctx->fb.hash); > + } > + > + crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), > + sizeof(struct spacc_crypto_reqctx) + > + crypto_ahash_reqsize(tctx->fb.hash)); I thought you added set_statesize based on the fallback state size, but it appears to be missing? Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt