Skip to content

Commit

Permalink
[PATCH] crypto api: Use the right value when advancing scatterwalk_co…
Browse files Browse the repository at this point in the history
…pychunks

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>
  • Loading branch information
Herbert Xu authored and Linus Torvalds committed Mar 31, 2007
1 parent c35e584 commit beff804
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 beff804

Please sign in to comment.