All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Mori Hess <fmh6jj@gmail.com>
To: dmaengine@vger.kernel.org
Cc: Qi Hou <qi.hou@windriver.com>
Subject: [RFC] dmaengine: pl330: fix a race condition in case of threaded irqs
Date: Mon, 05 Mar 2018 10:24:40 -0500	[thread overview]
Message-ID: <2132098.O3Wem7ivNc@bear> (raw)

On Tuesday, January 9, 2018 6:12:09 PM EST Qi Hou wrote:

> If that, there will be a hidden deadlock. As to irq handler of pl330, 
> get pl330->lock first,
> then pch->lock. As to tasklet of PL330, pch->lockfirst, then 
> pl330->lock. It have been
> verified when I enabled the kernel lock debug option.
> 
> And after tracing the changelogs of the driver of the DMA controller 
> PL330, I have to stay back.
> The pair of unlock/lock staffs is there since the original commit.  It 
> seems that the author
> intent to do things like that.
> 
> If it's hard to trace the author's intention, maybe the advised fix 
> below could be taken, since
> there is no side effect.  And it achieves the same goal as the original 
> wants to.

I'd like to see this patch get applied, it seems to have been sitting in the dmaengine patchwork as a RFC for a while now.  We've hit this same problem (by using irq affinity to spread the pl330 interrupts across multiple cpus rather than using threadirqs) and the patch fixed it.

Reviewed-by: Frank Mori Hess <fmh6jj@gmail.com>
Tested-by: Frank Mori Hess <fmh6jj@gmail.com>
---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-03-05 15:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05 15:24 Frank Mori Hess [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-06  0:57 [RFC] dmaengine: pl330: fix a race condition in case of threaded irqs Qi Hou
2018-01-09 10:12 Qi Hou
2018-01-09 10:12 ` qhou
2018-01-09  8:29 Jassi Brar
2018-01-09  8:29 ` Jassi Brar
2017-12-25  2:20 Qi Hou
2017-12-25  2:20 ` Qi Hou

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=2132098.O3Wem7ivNc@bear \
    --to=fmh6jj@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=qi.hou@windriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.