aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-03-30 22:14:37 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-30 22:26:33 -0400
commitbeff804d8dd360ccb4dd0096c9fd77a93fe9049e (patch)
treecbc72c484fc07ee86b26be196518dd8ca37ac4ff
parentc35e584c087381aaa5f1ed40a28b978535c18fb2 (diff)
[PATCH] crypto api: Use the right value when advancing scatterwalk_copychunks
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 <herbert@gondor.apana.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--crypto/scatterwalk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index a66423121773..0f76175f623f 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -91,7 +91,7 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
91 memcpy_dir(buf, vaddr, len_this_page, out); 91 memcpy_dir(buf, vaddr, len_this_page, out);
92 scatterwalk_unmap(vaddr, out); 92 scatterwalk_unmap(vaddr, out);
93 93
94 scatterwalk_advance(walk, nbytes); 94 scatterwalk_advance(walk, len_this_page);
95 95
96 if (nbytes == len_this_page) 96 if (nbytes == len_this_page)
97 break; 97 break;