From: Ingo Molnar <mingo@elte.hu>
To: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: perex@suse.cz, alsa-devel@alsa-project.org,
Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.17-rc4-mm3-lockdep BUG: possible deadlock detected!
Date: Mon, 29 May 2006 21:07:07 +0200 [thread overview]
Message-ID: <20060529190707.GB24445@elte.hu> (raw)
In-Reply-To: <6bffcb0e0605291132u701cd69tb855cf60fa317994@mail.gmail.com>
* Michal Piotrowski <michal.k.k.piotrowski@gmail.com> wrote:
> I get this with Ingo's lockdep patch from
> http://people.redhat.com/mingo/generic-irq-subsystem/
sigh, that patchset is not released yet ... it showed up in the genirq
directory accidentally. (will release it later today)
> ====================================
> [ BUG: possible deadlock detected! ]
> ------------------------------------
at first sight this looks like a rare case of nested locking not yet
covered by the lock validator. Could you try the patch below, to
correctly express this locking construct to the lock validator?
Btw., beyond this false positive, i dont see how the lock ordering
between ports is guaranteed - maybe there's some implicit rule that
enforces it. And the whole grp->list_lock and grp->list_mutex lock use
seems quite fragile - using list_lock in atomic contexts and list_mutex
in schedulable contexts?
Ingo
Index: linux/sound/core/seq/seq_ports.c
===================================================================
--- linux.orig/sound/core/seq/seq_ports.c
+++ linux/sound/core/seq/seq_ports.c
@@ -518,7 +518,7 @@ int snd_seq_port_connect(struct snd_seq_
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;
@@ -591,7 +591,7 @@ int snd_seq_port_disconnect(struct snd_s
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) {
next prev parent reply other threads:[~2006-05-29 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-29 18:32 Michal Piotrowski
2006-05-29 18:47 ` Andrew Morton
2006-05-30 10:34 ` Takashi Iwai
2006-05-29 19:07 ` Ingo Molnar [this message]
2006-05-29 19:53 ` Michal Piotrowski
2006-05-30 14:14 ` [Alsa-devel] " Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060529190707.GB24445@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=perex@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®