Skip to content

Commit

Permalink
[CRYPTO] api: Use the right value when advancing scatterwalk_copychunks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
herbertx committed Mar 31, 2007
1 parent ce20269 commit 4ee531a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/scatterwalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ee531a

Please sign in to comment.