Skip to content

Commit

Permalink
crypto: mcryptd - Fix load failure
Browse files Browse the repository at this point in the history
mcryptd_create_hash() fails by returning -EINVAL, causing any
driver using mcryptd to fail to load. It is because it needs
to set its statesize properly.

Signed-off-by: Rui Wang <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
ruiwang1 authored and herbertx committed Jan 30, 2016
1 parent 2f313e0 commit ddef482
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/mcryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ static int mcryptd_create_hash(struct crypto_template *tmpl, struct rtattr **tb,
inst->alg.halg.base.cra_flags = type;

inst->alg.halg.digestsize = salg->digestsize;
inst->alg.halg.statesize = salg->statesize;
inst->alg.halg.base.cra_ctxsize = sizeof(struct mcryptd_hash_ctx);

inst->alg.halg.base.cra_init = mcryptd_hash_init_tfm;
Expand Down

0 comments on commit ddef482

Please sign in to comment.