From: Vinod Koul <vkoul@kernel.org>
To: Ginger Li <ginger.jzllee@gmail.com>
Cc: sean.wang@mediatek.com, Frank.Li@kernel.org,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: milbeaut-hdmac: Fix deadlock with the channel IRQ handler
Date: Fri, 20 Nov 2026 14:59:49 +0530 [thread overview]
Message-ID: <awATDbG0Cl95eKWL@parshuram> (raw)
In-Reply-To: <20260923094426.67872-1-ginger.jzllee@gmail.com>
On 23-09-26, 17:44, Ginger Li wrote:
> milbeaut_hdmac_interrupt() is a hardirq handler and takes mc->vc.lock with a
> plain spin_lock() for the whole time it runs. interrupts are disabled locally
> in that context, so the handler itself is fine.
>
> milbeaut_hdmac_chan_config(), milbeaut_hdmac_chan_pause() and
> milbeaut_hdmac_chan_resume() are called from process context and take the same
> lock with a plain spin_lock() as well, so interrupts stay enabled while the
> lock is held.
>
> If a channel interrupt is delivered on the CPU that is inside one of those
> critical sections, milbeaut_hdmac_interrupt() spins on a lock that the
> interrupted code is holding and can never release, and the CPU hangs.
>
> Take mc->vc.lock with spin_lock_irqsave() in those three functions, as
> milbeaut_hdmac_issue_pending() and the other process context users of this
> lock already do.
Have you seen this deadlock in reallife, any logs?
--
~Vinod
prev parent reply other threads:[~2026-11-20 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 9:44 Ginger Li
2026-09-23 15:23 ` Frank Li
2026-11-20 9:29 ` Vinod Koul [this message]
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=awATDbG0Cl95eKWL@parshuram \
--to=vkoul@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=dmaengine@vger.kernel.org \
--cc=ginger.jzllee@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@mediatek.com \
/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®