]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: seq-dummy: remove deadlock-causing events on close
authorClemens Ladisch <clemens@ladisch.de>
Sun, 25 Jan 2015 13:34:29 +0000 (14:34 +0100)
committerLuis Henriques <luis.henriques@canonical.com>
Wed, 4 Feb 2015 10:58:17 +0000 (10:58 +0000)
commit3411d56b2bc632f14f5552d3b792aff05fdf261c
tree07eeeea03c5a0db2149c73b130d45e69b40c6f21
parent9c801b14c079816e6f44b0e525aac4a7b1df94fc
ALSA: seq-dummy: remove deadlock-causing events on close

commit 0767e95bb96d7fdddcd590fb809e6975d93aebc5 upstream.

When the last subscriber to a "Through" port has been removed, the
subscribed destination ports might still be active, so it would be
wrong to send "all sounds off" and "reset controller" events to them.
The proper place for such a shutdown would be the closing of the actual
MIDI port (and close_substream() in rawmidi.c already can do this).

This also fixes a deadlock when dummy_unuse() tries to send events to
its own port that is already locked because it is being freed.

Reported-by: Peter Billam <peter@www.pjb.com.au>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
sound/core/seq/seq_dummy.c