From: Ingo Molnar Date: Mon, 3 Jul 2006 07:25:21 +0000 (-0700) Subject: [PATCH] lockdep: annotate sound/core/seq/seq_ports.c X-Git-Tag: v2.6.18-rc1~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8371f0481fd1ad2701081d37815b0bb5d236b92;p=platform%2Fkernel%2Flinux-stable.git [PATCH] lockdep: annotate sound/core/seq/seq_ports.c Teach special (recursive) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar Signed-off-by: Arjan van de Ven Cc: Takashi Iwai Cc: Jaroslav Kysela Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c index d467b4f..8c64b58 100644 --- a/sound/core/seq/seq_ports.c +++ b/sound/core/seq/seq_ports.c @@ -514,7 +514,7 @@ int snd_seq_port_connect(struct snd_seq_client *connector, atomic_set(&subs->ref_count, 2); down_write(&src->list_mutex); - down_write(&dest->list_mutex); + down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING); exclusive = info->flags & SNDRV_SEQ_PORT_SUBS_EXCLUSIVE ? 1 : 0; err = -EBUSY; @@ -587,7 +587,7 @@ int snd_seq_port_disconnect(struct snd_seq_client *connector, unsigned long flags; down_write(&src->list_mutex); - down_write(&dest->list_mutex); + down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING); /* look for the connection */ list_for_each(p, &src->list_head) {