Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6116ea07 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 2594d960
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
		}