X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=crypto%2Fcryptd.c;h=e7aa904cb20bae034cf9520c5f67fe7da0358cda;hb=1616bc22bdc75b9ceefa06fa133949fd6bcd1c3f;hp=c81861b1350b60a1c2def7695dd16d7b0db39ade;hpb=d9b44fe30fb8637b23f804eab2e7afbce129d714;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,