mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: sean.wang@mediatek.com, Duoming Zhou <duoming@zju.edu.cn>
Cc: 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: mediatek: Fix deadlock caused by synchronize_irq()
Date: Wed, 04 Oct 2023 19:48:03 +0530	[thread overview]
Message-ID: <169642908358.429977.8140374757545835839.b4-ty@kernel.org> (raw)
In-Reply-To: <20230806032511.45263-1-duoming@zju.edu.cn>


On Sun, 06 Aug 2023 11:25:11 +0800, Duoming Zhou wrote:
> The synchronize_irq(c->irq) will not return until the IRQ handler
> mtk_uart_apdma_irq_handler() is completed. If the synchronize_irq()
> holds a spin_lock and waits the IRQ handler to complete, but the
> IRQ handler also needs the same spin_lock. The deadlock will happen.
> The process is shown below:
> 
>           cpu0                        cpu1
> mtk_uart_apdma_device_pause() | mtk_uart_apdma_irq_handler()
>   spin_lock_irqsave()         |
>                               |   spin_lock_irqsave()
>   //hold the lock to wait     |
>   synchronize_irq()           |
> 
> [...]

Applied, thanks!

[1/1] dmaengine: mediatek: Fix deadlock caused by synchronize_irq()
      commit: 01f1ae2733e2bb4de92fefcea5fda847d92aede1

Best regards,
-- 
~Vinod



      parent reply	other threads:[~2023-10-04 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06  3:25 Duoming Zhou
2023-08-08 11:45 ` Eugen Hristev
2023-10-04 14:18 ` 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=169642908358.429977.8140374757545835839.b4-ty@kernel.org \
    --to=vkoul@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=duoming@zju.edu.cn \
    --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®