X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=crypto%2Fcryptd.c;h=0c654e59f2157bc13e387a3ebfdcdc8b07b8170a;hb=f334bcd94b7d3c0fbc34d518a86548f451ab5faf;hp=77207b41940cf3503d5c1abc049ebaefada6819c;hpb=5c44ad6a35a9818039e301be289a1bb7ae77613e;p=cascardo%2Flinux.git diff --git a/crypto/cryptd.c b/crypto/cryptd.c index 77207b41940c..0c654e59f215 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,