[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>
This commit is contained in:
parent
2594d96079
commit
6116ea0741
1 changed files with 1 additions and 1 deletions
|
@ -245,9 +245,9 @@ static void clear_subscriber_list(struct snd_seq_client *client,
|
||||||
list_del(&subs->dest_list);
|
list_del(&subs->dest_list);
|
||||||
else
|
else
|
||||||
list_del(&subs->src_list);
|
list_del(&subs->src_list);
|
||||||
|
up_write(&agrp->list_mutex);
|
||||||
unsubscribe_port(c, aport, agrp, &subs->info, 1);
|
unsubscribe_port(c, aport, agrp, &subs->info, 1);
|
||||||
kfree(subs);
|
kfree(subs);
|
||||||
up_write(&agrp->list_mutex);
|
|
||||||
snd_seq_port_unlock(aport);
|
snd_seq_port_unlock(aport);
|
||||||
snd_seq_client_unlock(c);
|
snd_seq_client_unlock(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue