]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: qat - disable registration of algorithms
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Fri, 4 Mar 2022 17:54:47 +0000 (17:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2022 06:06:06 +0000 (08:06 +0200)
commit64dbd9e380ab1018977653005058d97673e5c741
tree82b0f95dff8880d45e6fa8600271c46bfcd1bb56
parentf7735356dc3e25fad21d248acd703ee40ca37483
crypto: qat - disable registration of algorithms

commit 8893d27ffcaf6ec6267038a177cb87bcde4dd3de upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/qat/qat_common/qat_crypto.c