Skip to content

Commit

Permalink
crypto: cryptd - Use crypto_aead_set_reqsize helper
Browse files Browse the repository at this point in the history
This patch uses the crypto_aead_set_reqsize helper to avoid directly
touching the internals of aead.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed May 13, 2015
1 parent 2c221ad commit 529a0b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/cryptd.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,8 @@ static int cryptd_aead_init_tfm(struct crypto_tfm *tfm)

crypto_aead_set_flags(cipher, CRYPTO_TFM_REQ_MAY_SLEEP);
ctx->child = cipher;
tfm->crt_aead.reqsize = sizeof(struct cryptd_aead_request_ctx);
crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
sizeof(struct cryptd_aead_request_ctx));
return 0;
}

Expand Down

0 comments on commit 529a0b6

Please sign in to comment.