Re: [PATCH 3/3] sound: dummy, avoid races with timer

2015-01-19 Thread Jiri Slaby
On 01/19/2015, 10:49 AM, Takashi Iwai wrote: >> @@ -322,12 +325,14 @@ static snd_pcm_uframes_t >> dummy_systimer_pointer(struct snd_pcm_substream *substream) >> { >> struct dummy_systimer_pcm *dpcm = substream->runtime->private_data; >> +unsigned long flags; >> snd_pcm_uframes_t pos

Re: [PATCH 3/3] sound: dummy, avoid races with timer

2015-01-19 Thread Takashi Iwai
At Mon, 19 Jan 2015 10:42:56 +0100, Jiri Slaby wrote: > > There is a race between timer and process contexts. Process context > does not disable irqs, so when a timer ticks inside process' critical > section, the system can deadlock. Fix this by a traditional _irqsave > variant of spin_lock. > >

[PATCH 3/3] sound: dummy, avoid races with timer

2015-01-19 Thread Jiri Slaby
There is a race between timer and process contexts. Process context does not disable irqs, so when a timer ticks inside process' critical section, the system can deadlock. Fix this by a traditional _irqsave variant of spin_lock. Signed-off-by: Jiri Slaby Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: