crypto: inside-secure - fix queued len computation
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 27 May 2019 14:51:02 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:53 +0000 (14:50 +0100)
commitccc988d685c2ed6caa95d554a48c7f1f706d0aad
tree77655d5fd6b48ec1ddec4d78194e5ddbc50cc4ac
parent65bf43424df4688215ba6f2bfa5d00fca3b3f481
crypto: inside-secure - fix queued len computation

[ Upstream commit ccd65a206a5025cf953a2e4f37e894921b131a5c ]

This patch fixes the queued len computation, which could theoretically
be wrong if req->len[1] - req->processed[1] > 1. Be future-proof here,
and fix it.

Fixes: b460edb6230a ("crypto: inside-secure - sha512 support")
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/crypto/inside-secure/safexcel_hash.c