mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Cc: mingo@elte.hu, perex@suse.cz, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.de>
Subject: Re: 2.6.17-rc4-mm3-lockdep BUG: possible deadlock detected!
Date: Mon, 29 May 2006 11:47:49 -0700	[thread overview]
Message-ID: <20060529114749.ba020660.akpm@osdl.org> (raw)
In-Reply-To: <6bffcb0e0605291132u701cd69tb855cf60fa317994@mail.gmail.com>

On Mon, 29 May 2006 20:32:47 +0200
"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/
> 
> ====================================
> [ BUG: possible deadlock detected! ]
> ------------------------------------
> modprobe/592 is trying to acquire lock:
>  (&grp->list_mutex){----}, at: [<fd9ee555>]
> snd_seq_port_connect+0xc0/0x337 [snd_seq]
> 
> but task is already holding lock:
>  (&grp->list_mutex){----}, at: [<fd9ee4fb>]
> snd_seq_port_connect+0x66/0x337 [snd_seq]
> 
> which could potentially lead to deadlocks!
> 
> other info that might help us debug this:
> 1 locks held by modprobe/592:
>  #0:  (&grp->list_mutex){----}, at: [<fd9ee4fb>]
> snd_seq_port_connect+0x66/0x337 [snd_seq]

yes,

        down_write(&src->list_mutex);
        down_write(&dest->list_mutex);

I wonder if there's anything which prevents another task from concurrently
coming in and trying to perform the opposite connection and causing a
deadlock.

The way we normally handle this is

	if (src < dest) {
		down_write(&src->list_mutex);
		down_write(&dest->list_mutex);
	} else {
		down_write(&dest->list_mutex);
		down_write(&src->list_mutex);
	}

  reply	other threads:[~2006-05-29 18:43 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 [this message]
2006-05-30 10:34   ` Takashi Iwai
2006-05-29 19:07 ` Ingo Molnar
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=20060529114749.ba020660.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=mingo@elte.hu \
    --cc=perex@suse.cz \
    --cc=tiwai@suse.de \
    /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®