From: Herbert Xu Date: Sat, 31 Mar 2007 02:14:37 +0000 (+1000) Subject: [PATCH] CRYPTO api: Use the right value when advancing scatterwalk_copychunks X-Git-Tag: v2.6.20.6~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05e624110bd9d839ad9ac1ffe2d0e01d11b2b604;p=thirdparty%2Fkernel%2Fstable.git [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 Signed-off-by: Chris Wright --- diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c index a66423121773a..0f76175f623fe 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;