crypto: ahash - Fully restore ahash request before completing
authorMarek Vasut <marex@denx.de>
Tue, 10 Dec 2013 19:26:19 +0000 (20:26 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 5 Jun 2017 20:13:55 +0000 (21:13 +0100)
commitcf55237533d7e62bdfb5b8235806493e32f9ee47
treed3d3d59ce40f66d9e51e58ca8715b93572eeb4eb
parent3f3b4a9db31af279e793229177b63ea201e24629
crypto: ahash - Fully restore ahash request before completing

commit 1d9a394b97b833d3ab37f49caf12d0be3c88050b upstream.

When finishing the ahash request, the ahash_op_unaligned_done() will
call complete() on the request. Yet, this will not call the correct
complete callback. The correct complete callback was previously stored
in the requests' private data, as seen in ahash_op_unaligned(). This
patch restores the correct complete callback and .data field of the
request before calling complete() on it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
crypto/ahash.c