From: Tom Lendacky <thomas.lendacky@amd.com>
To: <linux-crypto@vger.kernel.org>, <herbert@gondor.apana.org.au>,
<davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/3] crypto: ccp - Invoke context callback when there is a backlog error
Date: Mon, 24 Feb 2014 08:42:08 -0600 [thread overview]
Message-ID: <20140224144208.16181.98860.stgit@tlendack-t1.amdoffice.net> (raw)
In-Reply-To: <20140224144156.16181.81272.stgit@tlendack-t1.amdoffice.net>
Invoke the callback routine associated with the crypto context
if an error is encountered sending the command to the CCP during
backlog processing. This is needed to free any resources used
by the command.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/crypto/ccp/ccp-crypto-main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 9d30d6f..7d98635 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -183,6 +183,9 @@ static void ccp_crypto_complete(void *data, int err)
break;
/* Error occurred, report it and get the next entry */
+ ctx = crypto_tfm_ctx(held->req->tfm);
+ if (ctx->complete)
+ ret = ctx->complete(held->req, ret);
held->req->complete(held->req, ret);
next = ccp_crypto_cmd_complete(held, &backlog);
next prev parent reply other threads:[~2014-02-24 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 14:41 [PATCH 0/3] crypto: ccp - minor code fixes Tom Lendacky
2014-02-24 14:42 ` [PATCH 1/3] crypto: ccp - Prevent a possible lost CCP command request Tom Lendacky
2014-02-24 14:42 ` Tom Lendacky [this message]
2014-02-24 14:42 ` [PATCH 3/3] crypto: ccp - Account for CCP backlog processing Tom Lendacky
2014-02-25 12:19 ` [PATCH 0/3] crypto: ccp - minor code fixes Herbert Xu
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=20140224144208.16181.98860.stgit@tlendack-t1.amdoffice.net \
--to=thomas.lendacky@amd.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®