]> git.itanic.dy.fi Git - linux-stable/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)
committerZefan Li <lizefan@huawei.com>
Tue, 14 Apr 2015 09:33:56 +0000 (17:33 +0800)
commit612dcf53179f78a14fce5b4d5b397fa21f23c241
tree04115e71c36a3ac359016ebb452040721ee16dee
parent0f1de5af9774eb62a69921e86139bc52d90c4683
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: Zefan Li <lizefan@huawei.com>
sound/core/seq/seq_dummy.c