summaryrefslogtreecommitdiff
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2013-12-10 20:26:19 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2014-01-05 20:49:51 +0800
commitea99853924f8abacac7f4b65254cfb2165f403ba (patch)
treeb869ab509bf095978c5ec1dd91decda55692cbdb /crypto/ahash.c
parent78470cf88700c8629e17b2935ab1a4ac00e5819b (diff)
downloadlinux-crypto-ea99853924f8abacac7f4b65254cfb2165f403ba.tar.gz
linux-crypto-ea99853924f8abacac7f4b65254cfb2165f403ba.zip
crypto: ahash - Fully restore ahash request before completing
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>
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 793a27f2..a92dc382 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -213,7 +213,10 @@ static void ahash_op_unaligned_done(struct crypto_async_request *req, int err)
ahash_op_unaligned_finish(areq, err);
- complete(data, err);
+ areq->base.complete = complete;
+ areq->base.data = data;
+
+ complete(&areq->base, err);
}
static int ahash_op_unaligned(struct ahash_request *req,