projects/linux·commit beff804d

[PATCH] crypto api: Use the right value when advancing scatterwalk_copychunks

beff804d · Herbert Xu <[email protected]> · 2007-03-31 12:14:37 +10:00

In the scatterwalk_copychunks loop, We should be advancing by
len_this_page and not nbytes.  The latter is the total length.

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
beff804d8dd360ccb4dd0096c9fd77a93fe9049e
Parents
c35e584c

Changes

1 files changed · +1 −1

FileStatusAddDelContent
crypto/scatterwalk.cmodified+1−1View file

crypto/scatterwalk.c

View file
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index a664231..0f76175 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -91,7 +91,7 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
memcpy_dir(buf, vaddr, len_this_page, out);
scatterwalk_unmap(vaddr, out);
- scatterwalk_advance(walk, nbytes);
+ scatterwalk_advance(walk, len_this_page);
if (nbytes == len_this_page)
break;