Re: [PATCH 5/6] dmaengine: plx_dma: use spin_lock_bh() in plx_dma_process_desc()

From: Frank Li

Date: Fri Nov 06 2026 - 12:54:17 EST


On Tue, Nov 03, 2026 at 09:52:00AM -0600, Logan Gunthorpe wrote:
> plx_dma_process_desc() is also called from plx_dma_tx_status() in
> process context. With a plain spin_lock(), the desc_task tasklet can
> run on the same CPU while the lock is held, and spin on it forever.
>
> Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
> Link: https://lore.kernel.org/dmaengine/20260717223217.B6FBF1F000E9@xxxxxxxxxxxxxxx
> Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
> ---

Reviewed-by: Frank Li <Frank.Li@xxxxxxx>


> drivers/dma/plx_dma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
> index e4243b66f933..8c4b19d681ad 100644
> --- a/drivers/dma/plx_dma.c
> +++ b/drivers/dma/plx_dma.c
> @@ -138,7 +138,7 @@ static void plx_dma_process_desc(struct plx_dma_dev *plxdev)
> struct plx_dma_desc *desc;
> u32 flags;
>
> - spin_lock(&plxdev->ring_lock);
> + spin_lock_bh(&plxdev->ring_lock);
>
> while (plxdev->tail != plxdev->head) {
> desc = plx_dma_get_desc(plxdev, plxdev->tail);
> @@ -172,7 +172,7 @@ static void plx_dma_process_desc(struct plx_dma_dev *plxdev)
> plxdev->tail++;
> }
>
> - spin_unlock(&plxdev->ring_lock);
> + spin_unlock_bh(&plxdev->ring_lock);
> }
>
> static void plx_dma_abort_desc(struct plx_dma_dev *plxdev)
> --
> 2.47.3
>