public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Greg KH <greg@kroah.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi@vger.kernel.org, Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: lockdep whine in 2.6.26-rc2-mm1
Date: Thu, 15 May 2008 05:52:04 -0600	[thread overview]
Message-ID: <20080515115203.GH9921@parisc-linux.org> (raw)
In-Reply-To: <20080515090101.GA2915@darkstar.te-china.tietoenator.com>

On Thu, May 15, 2008 at 05:01:01PM +0800, Dave Young wrote:
> > The classes are different here, first sdev_class, then sg_sysfs_class

Oh ... right.  I misread scsi_register_interface as
class_register_interface.

> Greg, what about using mutex_lock_nested to silence lockdep? They are
> the only usage of class->mutex out of class.c

I don't see how we prove that, for example, you can never take the
sg_sysfs_class mutex and then take the sdev_class mutex.

There aren't /that/ many classes in the kernel (my laptop has 33 in
/sys/class).  How about we make each (sysfs) class its own (lockdep)
class?  That way we let lockdep do its job rather than telling it "nah,
you're all right, this is good".

I don't have a copy of the sem->mutex conversion to hand, but I imagine
you want to do something like:

 - Add a struct lock_class_key to struct class
 - In drivers/base/class.c use __mutex_init instead of mutex_init

I think that should be enough ...

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-05-15 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-14  7:09 lockdep whine in 2.6.26-rc2-mm1 Andrew Morton
2008-05-14 15:56 ` Greg KH
2008-05-14 16:24   ` Matthew Wilcox
2008-05-15  5:47     ` Dave Young
2008-05-15  9:01       ` Dave Young
2008-05-15 11:52         ` Matthew Wilcox [this message]
2008-05-17 10:14           ` Dave Young
2008-05-19  5:20             ` Dave Young
2008-05-19  7:56               ` Dave Young
2008-05-19 10:23               ` Matthew Wilcox
2008-05-20  1:27                 ` Dave Young
2008-05-20  1:51                   ` Matthew Wilcox
2008-05-20 18:07                   ` Greg KH
2008-05-21  3:20                     ` Dave Young
2008-05-21  4:38                       ` Greg KH
2008-05-15  5:50   ` Dave Young

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=20080515115203.GH9921@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=hidave.darkstar@gmail.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-scsi@vger.kernel.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