From: Johannes Berg <johannes@sipsolutions.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-pm <linux-pm@lists.osdl.org>
Subject: Re: Re: lockdep report in hibernate code
Date: Fri, 26 Oct 2007 12:36:18 +0200 [thread overview]
Message-ID: <1193394978.4406.41.camel@johannes.berg> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0710251310030.7029-100000@netrider.rowland.org>
[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]
> > We have two paths here:
> >
> > (a) sysfs write -> lock buffer -> call power management code
> > -> lock pm_mutex
> > (b) boot code -> power management boot -> lock pm_mutex
> > -> use name_to_dev_t() -> call sysfs -> lock buffer
> >
> > As you can see, lockdep rightfully complains about a possible deadlock
> > scenario although of course (b) only happens once at boot at a time
> > where (a) cannot happen. And now we're wondering how to fix it.
>
> Why not use mutex_lock_nested() for the boot-time pm_mutex lock call?
Is that going to help though? I thought lock_nested() is only for nested
within a class.
johannes
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2007-10-26 10:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 14:11 lockdep report in hibernate code Johannes Berg
2007-10-22 22:39 ` Rafael J. Wysocki
2007-10-23 10:34 ` Johannes Berg
2007-10-23 21:39 ` Rafael J. Wysocki
2007-10-23 21:56 ` Alan Stern
2007-10-23 22:18 ` Rafael J. Wysocki
2007-10-24 8:40 ` Johannes Berg
2007-10-24 21:57 ` Greg KH
2007-10-25 13:31 ` Johannes Berg
2007-10-25 17:13 ` Alan Stern
2007-10-26 10:36 ` Johannes Berg [this message]
2007-10-27 22:29 ` Alan Stern
2007-10-28 10:38 ` Johannes Berg
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=1193394978.4406.41.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-pm@lists.osdl.org \
--cc=stern@rowland.harvard.edu \
/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