crypto: qat - reduce size of mapped region
authorAdam Guerin <adam.guerin@intel.com>
Mon, 4 Jan 2021 17:21:59 +0000 (17:21 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 14 Jan 2021 06:10:26 +0000 (17:10 +1100)
commite48767c17718067ba21fb2ef461779ec2506f845
treeee38c865ac3dc6e5f6c707438f0134d9f1214248
parent80fccf18fec399de2151f84276d799ee0f704141
crypto: qat - reduce size of mapped region

Restrict size of field to what is required by the operation.

This issue was detected by smatch:

    drivers/crypto/qat/qat_common/qat_asym_algs.c:328 qat_dh_compute_value() error: dma_map_single_attrs() '&qat_req->in.dh.in.b' too small (8 vs 64)

Signed-off-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_asym_algs.c