X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Fcrypto%2Fcryptd.c;fp=kernel%2Fcrypto%2Fcryptd.c;h=e7aa904cb20bae034cf9520c5f67fe7da0358cda;hb=52f993b8e89487ec9ee15a7fb4979e0f09a45b27;hp=c81861b1350b60a1c2def7695dd16d7b0db39ade;hpb=c189ccac5702322ed843fe17057035b7222a59b6;p=kvmfornfv.git diff --git a/kernel/crypto/cryptd.c b/kernel/crypto/cryptd.c index c81861b13..e7aa904cb 100644 --- a/kernel/crypto/cryptd.c +++ b/kernel/crypto/cryptd.c @@ -594,9 +594,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,