Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit beff804d authored by Herbert Xu's avatar Herbert Xu Committed by Linus Torvalds
Browse files

[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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c35e584c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;