diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-05 20:16:10 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-12-05 20:16:10 +0300 |
commit | ef3263e35e26eb1061260131c4d6d579eea21f85 (patch) | |
tree | 640cf71ae612ea28b5dd91a2a9d6a005f50a7345 /drivers | |
parent | 3e5de27e940d00d8d504dfb96625fb654f641509 (diff) | |
parent | 57891633eeef60e732e045731cf20e50ee80acb4 (diff) | |
download | linux-ef3263e35e26eb1061260131c4d6d579eea21f85.tar.xz |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
"This fixes the following issues:
- Intermittent build failure in RSA
- Memory corruption in chelsio crypto driver
- Regression in DRBG due to vmalloced stack"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: rsa - Add Makefile dependencies to fix parallel builds
crypto: chcr - Fix memory corruption
crypto: drbg - prevent invalid SG mappings
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/chelsio/chcr_algo.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/chelsio/chcr_algo.h b/drivers/crypto/chelsio/chcr_algo.h index ec64fbcdeb49..199b0bb69b89 100644 --- a/drivers/crypto/chelsio/chcr_algo.h +++ b/drivers/crypto/chelsio/chcr_algo.h @@ -422,7 +422,7 @@ static inline void get_aes_decrypt_key(unsigned char *dec_key, { u32 temp; u32 w_ring[MAX_NK]; - int i, j, k = 0; + int i, j, k; u8 nr, nk; switch (keylength) { @@ -460,6 +460,7 @@ static inline void get_aes_decrypt_key(unsigned char *dec_key, temp = w_ring[i % nk]; i++; } + i--; for (k = 0, j = i % nk; k < nk; k++) { *((u32 *)dec_key + k) = htonl(w_ring[j]); j--; |