diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-09 12:24:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-09 12:24:19 -0700 |
commit | c1d9617f0d458249b0d20bd88b2ba0c5bb7fac06 (patch) | |
tree | 8fddb5b0d50b74e673466a2053ea3e8839979ed7 | |
parent | 68a400ed97c873983dd31c2d5cb5d41b7916f019 (diff) | |
parent | 7a570da2389c01f3270c10d84ccb664c0f87bde7 (diff) | |
download | linux-crypto-c1d9617f0d458249b0d20bd88b2ba0c5bb7fac06.tar.gz linux-crypto-c1d9617f0d458249b0d20bd88b2ba0c5bb7fac06.zip |
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:
- bug in ahash SG list walking that may lead to crashes
- resource leak in qat
- missing RSA dependency that causes it to fail"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: rsa - select crypto mgr dependency
crypto: hash - Fix page length clamping in hash walk
crypto: qat - fix adf_ctl_drv.c:undefined reference to adf_init_pf_wq
crypto: qat - fix invalid pf2vf_resp_wq logic
Diffstat (limited to '')
-rw-r--r-- | crypto/Kconfig | 1 | ||||
-rw-r--r-- | crypto/ahash.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 93a1fdc1..1d33beb6 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -96,6 +96,7 @@ config CRYPTO_AKCIPHER config CRYPTO_RSA tristate "RSA algorithm" select CRYPTO_AKCIPHER + select CRYPTO_MANAGER select MPILIB select ASN1 help diff --git a/crypto/ahash.c b/crypto/ahash.c index 5fc1f172..3887a98a 100644 --- a/crypto/ahash.c +++ b/crypto/ahash.c @@ -69,8 +69,9 @@ static int hash_walk_new_entry(struct crypto_hash_walk *walk) struct scatterlist *sg; sg = walk->sg; - walk->pg = sg_page(sg); walk->offset = sg->offset; + walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); + walk->offset = offset_in_page(walk->offset); walk->entrylen = sg->length; if (walk->entrylen > walk->total) |