summaryrefslogtreecommitdiff
path: root/crypto/ahash.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-02-17 18:48:51 -0800
committerDavid S. Miller <davem@davemloft.net>2015-02-17 18:48:51 -0800
commit11af4409245096cef96a41327ed970f8789e1c1c (patch)
tree80621c6623aa54dceafc5743c8a016b609d7dc46 /crypto/ahash.c
parentbaefc38c7ec56afcfa92594930b747a050c599b7 (diff)
parent9ece59e8fd3d017e04382709a4d48e81e00246fb (diff)
downloadlinux-crypto-11af4409245096cef96a41327ed970f8789e1c1c.tar.gz
linux-crypto-11af4409245096cef96a41327ed970f8789e1c1c.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'crypto/ahash.c')
-rw-r--r--crypto/ahash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ahash.c b/crypto/ahash.c
index f6a36a52..8acb8860 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -55,6 +55,7 @@ static int hash_walk_next(struct crypto_hash_walk *walk)
if (offset & alignmask) {
unsigned int unaligned = alignmask + 1 - (offset & alignmask);
+
if (nbytes > unaligned)
nbytes = unaligned;
}
@@ -120,7 +121,7 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
if (!walk->total)
return 0;
- walk->sg = scatterwalk_sg_next(walk->sg);
+ walk->sg = sg_next(walk->sg);
return hash_walk_new_entry(walk);
}