]> 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:05:22 +0000 (11:05 +0100)
commite4da95e1246fcba9cfa55657e0c46965963dbc19
tree44fc2bedca8255f85e9aa58362d9a47c7f3b9d52
parent8cb51a55b26eadc671748adbac12ebb2375ec9c1
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