From: Peter Zijlstra <peterz@infradead.org>
To: Daniel Walker <dwalker@mvista.com>
Cc: Remy Bohmer <linux@bohmer.net>, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Dave Chinner <dgc@sgi.com>
Subject: Re: lockdep problem conversion semaphore->mutex (dev->sem)
Date: Sat, 08 Dec 2007 18:36:53 +0100 [thread overview]
Message-ID: <1197135413.6353.36.camel@lappy> (raw)
In-Reply-To: <1197133577.1568.166.camel@jnielson-xp.ddns.mvista.com>
On Sat, 2007-12-08 at 09:06 -0800, Daniel Walker wrote:
> On Sat, 2007-12-08 at 18:11 +0100, Peter Zijlstra wrote:
>
> > > It must be the locking in __driver_attach(), taking dev->parent->sem
> > > then taking dev->sem .. Assuming those are different structures, why
> > > does lockdep trigger?
> >
> > They aren't different, parent is a struct device again.
>
> It's different memory tho .. I wasn't sure how to term that .. The locks
> are in two different memory location so it couldn't be recursive .. I'm
> only asking for my own understanding .. I don't mind inspecting
> potentially bad locking ..
Yeah, it are different lock instances, however by virtue of sharing the
same lock init site, they belong to the same lock class. Lockdep works
by tracking class dependancies, not instance dependancies.
By generalizing to classes it can detect locking errors before they
actually occur.
next prev parent reply other threads:[~2007-12-08 17:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 23:02 lockdep problem conversion semaphore->mutex (dev->sem) Remy Bohmer
2007-12-08 12:16 ` Peter Zijlstra
2007-12-08 16:53 ` Daniel Walker
2007-12-08 17:11 ` Peter Zijlstra
2007-12-08 17:06 ` Daniel Walker
2007-12-08 17:36 ` Peter Zijlstra [this message]
2007-12-08 19:52 ` Remy Bohmer
2007-12-08 20:04 ` Peter Zijlstra
2007-12-08 20:33 ` Remy Bohmer
2007-12-08 20:50 ` Peter Zijlstra
2007-12-08 20:55 ` Remy Bohmer
2007-12-08 22:57 ` Jarek Poplawski
2007-12-08 20:08 ` Ingo Molnar
2007-12-08 20:48 ` Remy Bohmer
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=1197135413.6353.36.camel@lappy \
--to=peterz@infradead.org \
--cc=dgc@sgi.com \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@bohmer.net \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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