Skip to contentSkip to conversation

dmaengine: pl330: fix a race condition in case of threaded irqs

RFC Frank Mori Hess 1 participant 1 message Mar 5, 2018 dmaengine

lore
Share & tools
lore

Frank Mori Hess

author Reviewed-by Tested-by
#0 lore raw
Quoted 12 lines · EST Qi Hou

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.

Quoted 4 lines

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.

---
To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html