diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-31 12:16:20 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-31 12:16:20 +1000 |
commit | 4ee531a3e661207d4b2174486b0f86017a3adb82 (patch) | |
tree | 44d6a1cc5809d6263364367ac22a935cc294e270 /crypto/scatterwalk.c | |
parent | ce20269d1e97030afa476e12b99d2437e748d225 (diff) | |
download | lwn-4ee531a3e661207d4b2174486b0f86017a3adb82.tar.gz lwn-4ee531a3e661207d4b2174486b0f86017a3adb82.zip |
[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>
Diffstat (limited to 'crypto/scatterwalk.c')
-rw-r--r-- | crypto/scatterwalk.c | 2 |
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; |