crypto: cryptd - Use crypto_aead_set_reqsize helper
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 11 May 2015 09:47:58 +0000 (17:47 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 13 May 2015 02:31:40 +0000 (10:31 +0800)
This patch uses the crypto_aead_set_reqsize helper to avoid directly
touching the internals of aead.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/cryptd.c

index b0602ba03111230f42b34ca7c6d169a54d7c24ef..e1584fb5ba34b9fa8e51d7b41f8dfc46edaba1de 100644 (file)
@@ -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;
 }