aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 11:14:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-20 11:14:58 -0700
commit277b5fb35b770792f89fbe50df03daddb3fa9521 (patch)
tree1b5558cff414274bbc07d1df6ca7cd743df20c4c /crypto
parenta54769c505db4bdf01d19dca64d15cb303503d71 (diff)
parent511d63cb19329235bc9298b64010ec494b5e1408 (diff)
downloadlinux-linaro-stable-277b5fb35b770792f89fbe50df03daddb3fa9521.tar.gz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu: - Locking fix for talitos driver - Fix 64-bit counter overflow in SHA-512 - Build fix for ixp4xx. * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: talitos - properly lock access to global talitos registers crypto: ixp4xx - include fix crypto: sha512 - Fix byte counter overflow in SHA-512
Diffstat (limited to 'crypto')
-rw-r--r--crypto/sha512_generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c
index 107f6f7be5e1..dd30f40af9f5 100644
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -174,7 +174,7 @@ sha512_update(struct shash_desc *desc, const u8 *data, unsigned int len)
index = sctx->count[0] & 0x7f;
/* Update number of bytes */
- if (!(sctx->count[0] += len))
+ if ((sctx->count[0] += len) < len)
sctx->count[1]++;
part_len = 128 - index;