X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=crypto%2Fcryptd.c;h=e7aa904cb20bae034cf9520c5f67fe7da0358cda;hb=f6e71099d9eccf9a39e49ab81cf2a41c01d74153;hp=c81861b1350b60a1c2def7695dd16d7b0db39ade;hpb=92243b6fc8fcb16bf401b055f7a0ba79f70a4115;p=firefly-linux-kernel-4.4.55.git diff --git a/crypto/cryptd.c b/crypto/cryptd.c index c81861b1350b..e7aa904cb20b 100644 --- a/crypto/cryptd.c +++ b/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,