All of lore.kernel.org
 help / color / mirror / Atom feed
* race condition between dmaengine_pcm_dma_complete and snd_pcm_release
@ 2015-10-06 21:45 Matt Campbell
  2015-10-08  9:02 ` Lars-Peter Clausen
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Campbell @ 2015-10-06 21:45 UTC (permalink / raw)
  To: alsa-devel

Hi All,

I've been trying to track down a kernel crash I've been getting when
closing ALSA devices. There is a race condition between the bottom half
interrupt handler for the DMA system (dmaengine_pcm_dma_complete in
pcm_dmaengine.c) and the releasing of the sub-stream resources it receives
as an argument (when snd_pcm_release is called). An older thread from 2013
discussed this to a good extent so I wont go into the details here. I've
been unable to track down either a patch to fix this or even a good
solution that I could implement. I've spent a couple days trying to think
of an elegant solution and come up with nothing so far. Any input would be
appreciated.

Link to original thread:
http://mailman.alsa-project.org/pipermail/alsa-devel/2013-October/067111.html

It's worth nothing that the original thread points out how this can arise
on multi-core systems. In my case I'm on a single core system, but with the
real-time patch enabled and the userspace ALSA thread running at a higher
priority than the kernel's tasklet thread which can reproduce this almost
100% of the time.

~Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-16 13:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 21:45 race condition between dmaengine_pcm_dma_complete and snd_pcm_release Matt Campbell
2015-10-08  9:02 ` Lars-Peter Clausen
2015-10-08 13:38   ` Matt Campbell
2015-10-08 13:46     ` Matt Campbell
2015-10-12 12:01       ` Lars-Peter Clausen
2015-10-16 13:55         ` Lars-Peter Clausen

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.