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 1/3] crypto: ccp - Prevent a possible lost CCP command request
Date: Mon, 24 Feb 2014 08:42:02 -0600 [thread overview]
Message-ID: <20140224144202.16181.68619.stgit@tlendack-t1.amdoffice.net> (raw)
In-Reply-To: <20140224144156.16181.81272.stgit@tlendack-t1.amdoffice.net>
If a CCP command has been queued for processing at the
crypto layer then, when dequeueing it for processing, the
"can backlog" flag must be set so that the request isn't
lost if the CCP backlog queue limit is reached.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
drivers/crypto/ccp/ccp-crypto-main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/ccp/ccp-crypto-main.c b/drivers/crypto/ccp/ccp-crypto-main.c
index 010fded..9d30d6f 100644
--- a/drivers/crypto/ccp/ccp-crypto-main.c
+++ b/drivers/crypto/ccp/ccp-crypto-main.c
@@ -174,6 +174,10 @@ static void ccp_crypto_complete(void *data, int err)
/* Submit the next cmd */
while (held) {
+ /* Since we have already queued the cmd, we must indicate that
+ * we can backlog so as not to "lose" this request.
+ */
+ held->cmd->flags |= CCP_CMD_MAY_BACKLOG;
ret = ccp_enqueue_cmd(held->cmd);
if (ccp_crypto_success(ret))
break;
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 ` Tom Lendacky [this message]
2014-02-24 14:42 ` [PATCH 2/3] crypto: ccp - Invoke context callback when there is a backlog error Tom Lendacky
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=20140224144202.16181.68619.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®