Skip to content

Commit

Permalink
crypto: cryptd - Use crypto_ahash_set_reqsize
Browse files Browse the repository at this point in the history
This patch makes cryptd use crypto_ahash_set_reqsize to avoid
accessing crypto_ahash directly.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Jul 14, 2009
1 parent fc00127 commit 0d6669e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,9 @@ static int cryptd_hash_init_tfm(struct crypto_tfm *tfm)
return PTR_ERR(hash);

ctx->child = hash;
tfm->crt_ahash.reqsize = sizeof(struct cryptd_hash_request_ctx) +
crypto_shash_descsize(hash);
crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm),
sizeof(struct cryptd_hash_request_ctx) +
crypto_shash_descsize(hash));
return 0;
}

Expand Down

0 comments on commit 0d6669e

Please sign in to comment.