OSDN Git Service

crypto: qat - disable registration of algorithms
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Fri, 4 Mar 2022 17:54:47 +0000 (17:54 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 9 Mar 2022 03:12:32 +0000 (15:12 +1200)
commit8893d27ffcaf6ec6267038a177cb87bcde4dd3de
treee0982cd307b8c145923b02bf004bbd52e367eea2
parentfd11727eec0dd95ee1b7d8f9f10ee60678eecc29
crypto: qat - disable registration of algorithms

The implementations of aead and skcipher in the QAT driver do not
support properly requests with the CRYPTO_TFM_REQ_MAY_BACKLOG flag set.
If the HW queue is full, the driver returns -EBUSY but does not enqueue
the request.
This can result in applications like dm-crypt waiting indefinitely for a
completion of a request that was never submitted to the hardware.

To avoid this problem, disable the registration of all crypto algorithms
in the QAT driver by setting the number of crypto instances to 0 at
configuration time.

Cc: stable@vger.kernel.org
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_4xxx/adf_drv.c
drivers/crypto/qat/qat_common/qat_crypto.c