Skip to content

Commit c1a8fa6

Browse files
atenartherbertx
authored andcommitted
crypto: inside-secure - fix the extra cache computation
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>
1 parent e1d24c0 commit c1a8fa6

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
@@ -198,7 +198,7 @@ static int safexcel_ahash_send_req(struct crypto_async_request *async, int ring,
198198
/* If this is not the last request and the queued data
199199
* is a multiple of a block, cache the last one for now.
200200
*/
201-
extra = queued - crypto_ahash_blocksize(ahash);
201+
extra = crypto_ahash_blocksize(ahash);
202202

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

0 commit comments

Comments
 (0)