summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-03-31 12:14:37 +1000
committerChris Wright <chrisw@sous-sol.org>2007-04-06 13:02:34 -0700
commit05e624110bd9d839ad9ac1ffe2d0e01d11b2b604 (patch)
tree42cd6bf5113eb145b6aad019c986780a188ea54a
parent470cf5d01d702afb4fa0900c6085b39fb03aa899 (diff)
downloadkernel-common-05e624110bd9d839ad9ac1ffe2d0e01d11b2b604.tar.gz
kernel-common-05e624110bd9d839ad9ac1ffe2d0e01d11b2b604.tar.bz2
kernel-common-05e624110bd9d839ad9ac1ffe2d0e01d11b2b604.zip
[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: Chris Wright <chrisw@sous-sol.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,
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;