]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6ec4e4b92206173a08458c1467876154df13f2f0
treeee38c865ac3dc6e5f6c707438f0134d9f1214248
parent92f0db3e870f8b5dd25482d9536969b38c66677d
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