summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-02-07 14:07:08 +0100
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:03:58 +0100
commit6116ea0741abf8f1ef9d93642d985f91c58ff6bf (patch)
treef65c9a099a0448a776bb5daa91af590cf3b06008 /sound/core
parent2594d960793f13582c0730a99c5396cded7cf9d9 (diff)
[ALSA] Fix possible deadlocks in sequencer at removal of ports
Fix possible rwsem deadlocks in sequencer code at removal of sequencer ports. The list_lock of port group can be double locked. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_ports.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index d88153438d6..eefd1cf872b 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -245,9 +245,9 @@ static void clear_subscriber_list(struct snd_seq_client *client,
list_del(&subs->dest_list);
else
list_del(&subs->src_list);
+ up_write(&agrp->list_mutex);
unsubscribe_port(c, aport, agrp, &subs->info, 1);
kfree(subs);
- up_write(&agrp->list_mutex);
snd_seq_port_unlock(aport);
snd_seq_client_unlock(c);
}