linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] crypto: Fully restore ahash request before completing
@ 2013-12-10 19:26 Marek Vasut
  2013-12-10 19:26 ` [PATCH V2 2/5] crypto: mxs: Remove the old DCP driver Marek Vasut
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Marek Vasut @ 2013-12-10 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

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: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-crypto at vger.kernel.org
---
 crypto/ahash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/crypto/ahash.c b/crypto/ahash.c
index 793a27f..a92dc38 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,
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 16+ messages in thread
* [PATCH 1/5] crypto: Fully restore ahash request before completing
@ 2013-12-01 21:20 Marek Vasut
  0 siblings, 0 replies; 16+ messages in thread
From: Marek Vasut @ 2013-12-01 21:20 UTC (permalink / raw)
  To: linux-arm-kernel

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: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-crypto at vger.kernel.org
---
 crypto/ahash.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/crypto/ahash.c b/crypto/ahash.c
index 793a27f..a92dc38 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,
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-01-14 17:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 19:26 [PATCH 1/5] crypto: Fully restore ahash request before completing Marek Vasut
2013-12-10 19:26 ` [PATCH V2 2/5] crypto: mxs: Remove the old DCP driver Marek Vasut
2013-12-10 19:26 ` [PATCH V3 3/5] crypto: mxs: Add Freescale MXS " Marek Vasut
2013-12-10 19:26 ` [PATCH 4/5] ARM: mxs: dts: Enable DCP for MXS Marek Vasut
2013-12-10 19:26 ` [PATCH V2 5/5] crypto: Sort drivers/crypto/Makefile Marek Vasut
2013-12-20 12:04 ` [PATCH 1/5] crypto: Fully restore ahash request before completing Herbert Xu
2013-12-27  0:21   ` Marek Vasut
2013-12-30  9:01     ` Herbert Xu
2014-01-03 15:10       ` Tom Lendacky
2014-01-03 22:33         ` Herbert Xu
2014-01-04  7:20           ` Marek Vasut
2014-01-05 13:05 ` Herbert Xu
2014-01-05 15:33   ` Marek Vasut
2014-01-05 23:29     ` Herbert Xu
2014-01-14 17:34       ` Marek Vasut
  -- strict thread matches above, loose matches on Subject: below --
2013-12-01 21:20 Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).