lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140224144208.16181.98860.stgit@tlendack-t1.amdoffice.net>
Date:	Mon, 24 Feb 2014 08:42:08 -0600
From:	Tom Lendacky <thomas.lendacky@....com>
To:	<linux-crypto@...r.kernel.org>, <herbert@...dor.apana.org.au>,
	<davem@...emloft.net>
CC:	<linux-kernel@...r.kernel.org>
Subject: [PATCH 2/3] crypto: ccp - Invoke context callback when there is a
 backlog error

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@....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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ