From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] crypto: Fully restore ahash request before completing
Date: Thu, 26 Sep 2013 13:18:24 +0200 [thread overview]
Message-ID: <1380194306-5243-1-git-send-email-marex@denx.de> (raw)
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>
---
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.rc3
next reply other threads:[~2013-09-26 11:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 11:18 Marek Vasut [this message]
2013-09-26 11:18 ` [PATCH 2/3] ARM: mxs: crypto: Add Freescale MXS DCP driver Marek Vasut
2013-09-26 11:27 ` Fabio Estevam
2013-09-26 12:07 ` Marek Vasut
2013-09-27 16:03 ` Tobias Rauter
2013-09-28 3:35 ` Marek Vasut
2013-10-07 9:50 ` Christoph G. Baumann
2013-10-07 15:48 ` Marek Vasut
2013-10-08 4:36 ` Herbert Xu
2013-10-08 10:33 ` Marek Vasut
2013-11-10 17:48 ` Marek Vasut
2013-11-20 11:20 ` Herbert Xu
2013-12-01 22:20 ` Marek Vasut
2013-09-26 12:13 ` Lothar Waßmann
2013-09-26 14:04 ` Marek Vasut
2013-09-26 14:09 ` Lothar Waßmann
2013-09-29 22:05 ` Marek Vasut
2013-09-26 12:37 ` Veli-Pekka Peltola
2013-09-26 14:02 ` Marek Vasut
2013-09-26 12:48 ` Fabio Estevam
2013-09-29 22:09 ` Marek Vasut
2013-09-26 11:18 ` [PATCH 3/3] ARM: mxs: dts: Enable DCP for MXS Marek Vasut
2013-09-26 11:36 ` Lothar Waßmann
2013-09-26 12:08 ` Marek Vasut
2013-09-29 22:11 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380194306-5243-1-git-send-email-marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).