Skip to content

Commit 7768fb2

Browse files
gcabidduherbertx
authored andcommitted
crypto: qat - Reduced reqsize in qat_algs
req_alloc functions already take into account the request data structure when allocating memory. Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 0f987e2 commit 7768fb2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎drivers/crypto/qat/qat_common/qat_algs.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,8 +1064,7 @@ static int qat_alg_aead_init(struct crypto_aead *tfm,
10641064
if (IS_ERR(ctx->hash_tfm))
10651065
return PTR_ERR(ctx->hash_tfm);
10661066
ctx->qat_hash_alg = hash;
1067-
crypto_aead_set_reqsize(tfm, sizeof(struct aead_request) +
1068-
sizeof(struct qat_crypto_request));
1067+
crypto_aead_set_reqsize(tfm, sizeof(struct qat_crypto_request));
10691068
return 0;
10701069
}
10711070

@@ -1114,8 +1113,7 @@ static int qat_alg_ablkcipher_init(struct crypto_tfm *tfm)
11141113
struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
11151114

11161115
spin_lock_init(&ctx->lock);
1117-
tfm->crt_ablkcipher.reqsize = sizeof(struct ablkcipher_request) +
1118-
sizeof(struct qat_crypto_request);
1116+
tfm->crt_ablkcipher.reqsize = sizeof(struct qat_crypto_request);
11191117
ctx->tfm = tfm;
11201118
return 0;
11211119
}

0 commit comments

Comments
 (0)