Re: [PATCH 09/10] crypto: qce - Terminate RX DMA channel if TX preparation fails
From: Bartosz Golaszewski
Date: Tue Nov 24 2026 - 07:49:31 EST
On Mon, Nov 23, 2026 at 03:10:00PM +0000, Lee Jones wrote:
> qce_dma_prep_sgs() prepares and submits the rxchan DMA descriptor via
> qce_dma_prep_sg() before preparing the txchan descriptor. If the
> subsequent txchan preparation fails, qce_dma_prep_sgs() returns an
> error while leaving the submitted rxchan descriptor queued in the DMA
> engine, and callers jump straight to unmapping their scatterlists
> without calling qce_dma_terminate_all().
>
> On the next cryptographic request, qce_dma_issue_pending() flushes the
> stale rxchan descriptor against already-unmapped memory.
>
> Terminate rxchan via dmaengine_terminate_async() when preparing txchan
> fails in qce_dma_prep_sgs().
>
> Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver")
> Closes: https://sashiko.dev/#/bug/linux-0b5dbd9f-7869-4856-a8e5-47c2c6e342f1
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
> ---
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>