]> 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:07:25 +0000 (11:07 +0100)
commitbe62a701714ce9191aa067f59c6be2e934e52cd1
treeff660e51f809703b70edcaf997244c72dce78813
parent3526d279e5f780a9bfa343bf9b40a7ace2876320
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