Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: ahash - Fix infinite recursion in ahash_def_finup

Invoke the final function directly in the default finup implementation
since crypto_ahash_final is now just a wrapper around finup.

Reported-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Herbert Xu df29f603 ac90aad0

+3 -1
+3 -1
crypto/ahash.c
··· 600 600 601 601 static int ahash_def_finup_finish1(struct ahash_request *req, int err) 602 602 { 603 + struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); 604 + 603 605 if (err) 604 606 goto out; 605 607 606 608 req->base.complete = ahash_def_finup_done2; 607 609 608 - err = crypto_ahash_final(req); 610 + err = crypto_ahash_alg(tfm)->final(req); 609 611 if (err == -EINPROGRESS || err == -EBUSY) 610 612 return err; 611 613