Message ID | aE-Y7VzdJTDJHsy_@gondor.apana.org.au |
---|---|
State | New |
Headers | show |
Series | crypto: ahash - Fix infinite recursion in ahash_def_finup | expand |
diff --git a/crypto/ahash.c b/crypto/ahash.c index bd9e49950201..3878b4da3cfd 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -603,12 +603,14 @@ static void ahash_def_finup_done2(void *data, int err) static int ahash_def_finup_finish1(struct ahash_request *req, int err) { + struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); + if (err) goto out; req->base.complete = ahash_def_finup_done2; - err = crypto_ahash_final(req); + err = crypto_ahash_alg(tfm)->final(req); if (err == -EINPROGRESS || err == -EBUSY) return err;