Re: sound: another WARNING in rawmidi_transmit_ack

From: Takashi Iwai
Date: Wed Feb 03 2016 - 09:42:23 EST


On Wed, 03 Feb 2016 14:21:05 +0100,
Dmitry Vyukov wrote:
>
> On Wed, Feb 3, 2016 at 8:15 AM, Takashi Iwai <tiwai@xxxxxxx> wrote:
> > On Tue, 02 Feb 2016 22:59:49 +0100,
> > Dmitry Vyukov wrote:
> >>
> >> On Mon, Feb 1, 2016 at 12:55 PM, Takashi Iwai <tiwai@xxxxxxx> wrote:
> >> > On Mon, 01 Feb 2016 12:31:20 +0100,
> >> > Dmitry Vyukov wrote:
> >> >>
> >> >> Hello,
> >> >>
> >> >> The following program triggers a splash of WARNINGs in rawmidi_transmit_ack.
> >> >> Takashi, I am on commit 36f90b0a2ddd60823fe193a85e60ff1906c2a9b3 + a
> >> >> bunch of your recent fixes:
> >> >> https://gist.githubusercontent.com/dvyukov/40640128a433ad16a56a/raw/ab3a08637ce3654b969b778c5700fe4a80f14456/gistfile1.txt
> >> >
> >> > Ouch, this is another spot with an open race between
> >> > snd_rawmidi_transmit_peek() and snd_rawmidi_transmit_ack().
> >> >
> >> > Could you drop the previous fix and apply the one below instead?
> >> >
> >> > FWIW, I pushed sound.git tree topic/core-fixes branch containing all
> >> > pending fixes. This should be pullable cleanly onto 4.5-rc1/rc2.
> >> > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git topic/core-fixes
> >> >
> >> >
> >> > Thanks!
> >> >
> >> > Takashi
> >>
> >>
> >> Now this program hangs the machine with:
> >
> > Mea culpa, the spinlock was applied at the wrong place.
> > Below is the revised patch. I updated topic/core-fixes branch as
> > well.
>
>
> re-applied
> the reproducer does not trigger any issues now

Good, this was queued, too. Thanks!


Takashi