summaryrefslogtreecommitdiff
path: root/drivers/crypto/xilinx
diff options
context:
space:
mode:
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>2022-05-09 16:34:12 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2022-05-20 08:49:18 +0300
commit3dfaf0071ed74d7a9c6b3c9ea4df7a6f8e423c2a (patch)
treef9b1735c05d271c4e9e59e87c43ba8424a17b892 /drivers/crypto/xilinx
parent80a52e1ee7757b742f96bfb0d58f0c14eb6583d0 (diff)
downloadlinux-3dfaf0071ed74d7a9c6b3c9ea4df7a6f8e423c2a.tar.xz
crypto: qat - remove dma_free_coherent() for RSA
After commit f5ff79fddf0e ("dma-mapping: remove CONFIG_DMA_REMAP"), if the algorithms are enabled, the driver crashes with a BUG_ON while executing vunmap() in the context of a tasklet. This is due to the fact that the function dma_free_coherent() cannot be called in an interrupt context (see Documentation/core-api/dma-api-howto.rst). The functions qat_rsa_enc() and qat_rsa_dec() allocate memory with dma_alloc_coherent() if the source or the destination buffers are made of multiple flat buffers or of a size that is not compatible with the hardware. This memory is then freed with dma_free_coherent() in the context of a tasklet invoked to handle the response for the corresponding request. Replace allocations with dma_alloc_coherent() in the functions qat_rsa_enc() and qat_rsa_dec() with kmalloc() + dma_map_single(). Cc: stable@vger.kernel.org Fixes: a990532023b9 ("crypto: qat - Add support for RSA algorithm") Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Adam Guerin <adam.guerin@intel.com> Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/xilinx')
0 files changed, 0 insertions, 0 deletions