Skip to content

Commit d03a0a6

Browse files
atenartgregkh
authored andcommitted
crypto: inside-secure - fix the extra cache computation
[ Upstream commit c1a8fa6 ] This patch fixes the extra cache computation when the queued data is a multiple of a block size. This fixes the hash support in some cases. Fixes: 809778e ("crypto: inside-secure - fix hash when length is a multiple of a block") Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6df2658 commit d03a0a6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/crypto/inside-secure/safexcel_hash.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static int safexcel_ahash_send_req(struct crypto_async_request *async, int ring,
199199
/* If this is not the last request and the queued data
200200
* is a multiple of a block, cache the last one for now.
201201
*/
202-
extra = queued - crypto_ahash_blocksize(ahash);
202+
extra = crypto_ahash_blocksize(ahash);
203203

204204
if (extra) {
205205
sg_pcopy_to_buffer(areq->src, sg_nents(areq->src),

0 commit comments

Comments
 (0)