Skip to content

Commit 32a9fd8

Browse files
committed
crypto: shash - Set reqsize in shash_alg
Make reqsize static for shash algorithms. Signed-off-by: Herbert Xu <[email protected]>
1 parent 8cf4c34 commit 32a9fd8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crypto/ahash.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ static int crypto_init_ahash_using_shash(struct crypto_tfm *tfm)
286286

287287
crypto_ahash_set_flags(crt, crypto_shash_get_flags(shash) &
288288
CRYPTO_TFM_NEED_KEY);
289-
crt->reqsize = sizeof(struct shash_desc) + crypto_shash_descsize(shash);
290289

291290
return 0;
292291
}

crypto/shash.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ static int shash_prepare_alg(struct shash_alg *alg)
511511
if (alg->statesize > HASH_MAX_STATESIZE)
512512
return -EINVAL;
513513

514+
base->cra_reqsize = sizeof(struct shash_desc) + alg->descsize;
515+
514516
return 0;
515517
}
516518

0 commit comments

Comments
 (0)