Thread (6 messages) 6 messages, 2 authors, 2016-08-30
STALE3594d

[PATCH 1/4] crypto: qce: Remove unneeded length check for scatterlist

From: Iaroslav Gridin <hidden>
Date: 2016-08-30 15:54:23
Also in: linux-arm-msm, lkml
Subsystem: crypto api, qualcomm crypto drivers, the rest · Maintainers: Herbert Xu, "David S. Miller", Bartosz Golaszewski, Linus Torvalds

From: Voker57 <redacted>

Current code avoids supplying scatterlist containing more data than used
to DMA. This leads to dropping data from scatterlists which would
leave some for next run.
Signed-off-by: Iaroslav Gridin <redacted>
---
 drivers/crypto/qce/sha.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c
index 47e114a..a124bb9 100644
--- a/drivers/crypto/qce/sha.c
+++ b/drivers/crypto/qce/sha.c
@@ -282,8 +282,6 @@ static int qce_ahash_update(struct ahash_request *req)
 	sg = sg_last = req->src;
 
 	while (len < nbytes && sg) {
-		if (len + sg_dma_len(sg) > nbytes)
-			break;
 		len += sg_dma_len(sg);
 		sg_last = sg;
 		sg = sg_next(sg);
-- 
2.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help