crypto: hash - Fix page length clamping in hash walk
[ Upstream commit
13f4bb78cf6a312bbdec367ba3da044b09bf0e29 ]
The crypto hash walk code is broken when supplied with an offset
greater than or equal to PAGE_SIZE. This patch fixes it by adjusting
walk->pg and walk->offset when this happens.
Cc: <stable@vger.kernel.org>
Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit
1669540814a1cf57ff50e037c5bf84f831ea4e09)
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>