From: Frank Li <Frank.li@oss.nxp.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.li@nxp.com>,
Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH 5/6] dmaengine: plx_dma: use spin_lock_bh() in plx_dma_process_desc()
Date: Fri, 6 Nov 2026 12:48:58 -0500 [thread overview]
Message-ID: <au4TCjPFQN0mPIv4@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20261103155202.461725-6-logang@deltatee.com>
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@kernel.org>
> Link: https://lore.kernel.org/dmaengine/20260717223217.B6FBF1F000E9@smtp.kernel.org
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> 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
>
next prev parent reply other threads:[~2026-11-06 17:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 15:51 [PATCH 0/6] plx_dma fixes Logan Gunthorpe
2026-11-03 15:51 ` [PATCH 1/6] dmaengine: plx_dma: don't call pci_irq_vector() under rcu_read_lock() Logan Gunthorpe
2026-11-06 17:27 ` Frank Li
2026-11-03 15:51 ` [PATCH 2/6] dmaengine: plx_dma: fix descriptor ring leak in alloc_chan_resources() Logan Gunthorpe
2026-11-06 17:28 ` Frank Li
2026-11-03 15:51 ` [PATCH 3/6] dmaengine: plx_dma: use writel() for the 32-bit PLX_REG_CTRL register Logan Gunthorpe
2026-11-06 17:29 ` Frank Li
2026-11-03 15:51 ` [PATCH 4/6] dmaengine: plx_dma: add dma_rmb() after observing write-back status Logan Gunthorpe
2026-11-06 17:47 ` Frank Li
2026-11-06 23:13 ` Logan Gunthorpe
2026-11-03 15:52 ` [PATCH 5/6] dmaengine: plx_dma: use spin_lock_bh() in plx_dma_process_desc() Logan Gunthorpe
2026-11-06 17:48 ` Frank Li [this message]
2026-11-03 15:52 ` [PATCH 6/6] dmaengine: plx_dma: don't invoke client callbacks with ring_lock held Logan Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=au4TCjPFQN0mPIv4@lizhi-Precision-Tower-5810 \
--to=frank.li@oss.nxp.com \
--cc=Frank.li@nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=sashiko-bot@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®