Skip to content

Commit

Permalink
crypto: img-hash - Fix set_reqsize call
Browse files Browse the repository at this point in the history
Properly allocate enough memory to respect the fallback.

Signed-off-by: Will Thomas <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Will Thomas authored and herbertx committed Aug 9, 2016
1 parent fb67740 commit 5e38d20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/crypto/img-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ static int img_hash_cra_init(struct crypto_tfm *tfm, const char *alg_name)
}
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
sizeof(struct img_hash_request_ctx) +
crypto_ahash_reqsize(ctx->fallback) +
IMG_HASH_DMA_THRESHOLD);

return 0;
Expand Down

0 comments on commit 5e38d20

Please sign in to comment.