diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2016-10-10 11:19:47 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-10-10 11:19:47 +0800 |
commit | 8322c8407e49034b534abd03d7daa9e267139b4e (patch) | |
tree | cad5cc216e7ef7a5e25e135c94f511cd3e59088c /crypto/cryptd.c | |
parent | 9900fc24982726c6957b008d35ef281ecada85fb (diff) | |
parent | 06b68744d85e6d6fb2e54bdb1aae6ec6599790d6 (diff) | |
download | linux-crypto-8322c8407e49034b534abd03d7daa9e267139b4e.tar.gz linux-crypto-8322c8407e49034b534abd03d7daa9e267139b4e.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree to pull in vmx ghash fix.
Diffstat (limited to '')
-rw-r--r-- | crypto/cryptd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c index cf8037a8..0c654e59 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -631,9 +631,14 @@ static int cryptd_hash_export(struct ahash_request *req, void *out) static int cryptd_hash_import(struct ahash_request *req, const void *in) { - struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); + struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); + struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm); + struct shash_desc *desc = cryptd_shash_desc(req); + + desc->tfm = ctx->child; + desc->flags = req->base.flags; - return crypto_shash_import(&rctx->desc, in); + return crypto_shash_import(desc, in); } static int cryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb, @@ -733,13 +738,14 @@ static void cryptd_aead_crypt(struct aead_request *req, rctx = aead_request_ctx(req); compl = rctx->complete; + tfm = crypto_aead_reqtfm(req); + if (unlikely(err == -EINPROGRESS)) goto out; aead_request_set_tfm(req, child); err = crypt( req ); out: - tfm = crypto_aead_reqtfm(req); ctx = crypto_aead_ctx(tfm); refcnt = atomic_read(&ctx->refcnt); |