[PATCH 0/3] crypto: marvell/cesa - Fix hash DMA buffer cleanup
From: Haoxiang Li
Date: Wed Nov 18 2026 - 02:57:18 EST
This series fixes DMA cache and padding buffer leaks in the CESA hash
request error paths.
The DMA cache is not released when request preparation fails. Padding
cleanup can also be skipped because request type detection depends on a
TDMA chain that has already been cleared. In addition, final requests
rejected by the queue leave their padding allocated.
The patches address these cleanup paths and clear the DMA cache pointer
after freeing it to prevent stale-pointer reuse.
Testing:
- ARM compile testing of hash.o for each intermediate revision, using
Clang with W=1 and KCFLAGS=-Werror.
- Userspace mock tests of extracted driver functions covering allocation
failures, queue rejection, backlog acceptance, completion cleanup,
retries and non-DMA requests.
The mock tests, which is assisted by codex, validate resource lifetimes
with DMA pools and hardware interfaces mocked. No hardware testing was performed.
Haoxiang Li (3):
crypto: marvell/cesa - Fix DMA cache leaks on hash setup errors
crypto: marvell/cesa - Fix padding cleanup on hash setup errors
crypto: marvell/cesa - Free hash padding when queueing fails
drivers/crypto/marvell/cesa/hash.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
--
2.25.1