From 55dbcd9a3215aee911e72fd44d10fa60ff293ca7 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 11 May 2015 17:48:01 +0800 Subject: [PATCH] crypto: pcrypt - Use crypto_aead_set_reqsize helper This patch uses the crypto_aead_set_reqsize helper to avoid directly touching the internals of aead. Signed-off-by: Herbert Xu (cherry picked from commit fd0de97890d88b979c2731bd5b70d504175fc2ed) Orabug: 24614549 Signed-off-by: Ethan Zhao Signed-off-by: Dhaval Giani --- crypto/pcrypt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index c305d4112735..ac115d591d66 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c @@ -292,9 +292,10 @@ static int pcrypt_aead_init_tfm(struct crypto_tfm *tfm) return PTR_ERR(cipher); ctx->child = cipher; - tfm->crt_aead.reqsize = sizeof(struct pcrypt_request) - + sizeof(struct aead_givcrypt_request) - + crypto_aead_reqsize(cipher); + crypto_aead_set_reqsize(__crypto_aead_cast(tfm), + sizeof(struct pcrypt_request) + + sizeof(struct aead_givcrypt_request) + + crypto_aead_reqsize(cipher)); return 0; } -- 2.50.1