浏览代码

crypto: img-hash - Fix set_reqsize call

Properly allocate enough memory to respect the fallback.

Signed-off-by: Will Thomas <will.thomas@imgtec.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Will Thomas 9 年之前
父节点
当前提交
5e38d20088
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/crypto/img-hash.c

+ 1 - 0
drivers/crypto/img-hash.c

@@ -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;