ChangeSet 1.2199.14.32, 2005/03/23 12:13:40-08:00, [EMAIL PROTECTED]
[CRYPTO]: Remap when walk_out crosses page in crypt()
This is needed so that we can keep the in_place assignment outside the
inner loop. Without this in pathalogical situations we can start out
having walk_out being different from walk_in, but when walk_out crosses
a page it may converge with walk_in.
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
cipher.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff -Nru a/crypto/cipher.c b/crypto/cipher.c
--- a/crypto/cipher.c 2005-03-26 17:24:28 -08:00
+++ b/crypto/cipher.c 2005-03-26 17:24:28 -08:00
@@ -129,7 +129,9 @@
complete_dst(&walk_out, bsize, dst_p, in_place);
nbytes -= bsize;
- } while (nbytes && !scatterwalk_across_pages(&walk_in, bsize));
+ } while (nbytes &&
+ !scatterwalk_across_pages(&walk_in, bsize) &&
+ !scatterwalk_across_pages(&walk_out, bsize));
scatterwalk_done(&walk_in, 0, nbytes);
scatterwalk_done(&walk_out, 1, nbytes);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html