]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: marvell/cesa - Do not chain submitted requests
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 May 2025 05:22:16 +0000 (13:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:11:12 +0000 (11:11 +0100)
commitea3c81acb041a41fe61b0c20b24d3760037b5432
treeae7cffb94c0b8157d701076fa30c45fadd91db09
parentbdb71ee65131890a4ec4d803bc1ef38a80676d25
crypto: marvell/cesa - Do not chain submitted requests

commit 0413bcf0fc460a68a2a7a8354aee833293d7d693 upstream.

This driver tries to chain requests together before submitting them
to hardware in order to reduce completion interrupts.

However, it even extends chains that have already been submitted
to hardware.  This is dangerous because there is no way of knowing
whether the hardware has already read the DMA memory in question
or not.

Fix this by splitting the chain list into two.  One for submitted
requests and one for requests that have not yet been submitted.
Only extend the latter.

Reported-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining crypto requests in TDMA mode")
Cc: <stable@vger.kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/marvell/cesa/cesa.c
drivers/crypto/marvell/cesa/cesa.h
drivers/crypto/marvell/cesa/tdma.c