]> git.baikalelectronics.ru Git - kernel.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)
committerTakashi Iwai <tiwai@suse.de>
Mon, 26 Jan 2015 12:53:13 +0000 (13:53 +0100)
commit18e85ebbb5e7c37f65e5dd3bd1f2ed620f47d362
tree06c39d6e7a954c97c2812509dcab3800a955e95f
parenta9a1086465bead9916b8cffe5a8b3d82725bb2f2
ALSA: seq-dummy: remove deadlock-causing events on close

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_dummy.c