summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-01 09:12:44 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-01 09:12:44 -0700
commite7c4f03b839ba4b64ce0a7c71d71a8e1b086c840 (patch)
treeb9724a621b17e505bf6954732c2251ef6261d697
parentd9244b5d2fbfe9fa540024b410047af13ceec90f (diff)
parentd315a0e09f1c8b833cacd5e72f3edea419978138 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: hash - Fix handling of sg entry that crosses page boundary
-rw-r--r--crypto/ahash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index b2d1ee32cfe..f3476374f76 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -82,10 +82,11 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
if (err)
return err;
- walk->offset = 0;
-
- if (nbytes)
+ if (nbytes) {
+ walk->offset = 0;
+ walk->pg++;
return hash_walk_next(walk);
+ }
if (!walk->total)
return 0;