Commit 0d6669e2ba60ce5f5d4def6ab453f03567cc738e
1 parent
fc00127fb6
Exists in
master
and in
20 other branches
crypto: cryptd - Use crypto_ahash_set_reqsize
This patch makes cryptd use crypto_ahash_set_reqsize to avoid accessing crypto_ahash directly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
crypto/cryptd.c
... | ... | @@ -353,8 +353,9 @@ |
353 | 353 | return PTR_ERR(hash); |
354 | 354 | |
355 | 355 | ctx->child = hash; |
356 | - tfm->crt_ahash.reqsize = sizeof(struct cryptd_hash_request_ctx) + | |
357 | - crypto_shash_descsize(hash); | |
356 | + crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), | |
357 | + sizeof(struct cryptd_hash_request_ctx) + | |
358 | + crypto_shash_descsize(hash)); | |
358 | 359 | return 0; |
359 | 360 | } |
360 | 361 |