From: "Dave Young" <hidave.darkstar@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: akpm@linux-foundation.org, greg@kroah.com, matthew@wil.cx,
kay.sievers@vrfy.org, linux-kernel@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH][-mm] reclassify sg_sysfs_class for lockdep
Date: Thu, 29 May 2008 08:45:43 +0800 [thread overview]
Message-ID: <a8e1da0805281745g31c8217fk860dfe17cc674be5@mail.gmail.com> (raw)
In-Reply-To: <1211985600.3445.14.camel@localhost.localdomain>
On Wed, May 28, 2008 at 10:40 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Tue, 2008-05-27 at 18:10 +0800, Dave Young wrote:
>> As register sg_interface, the sg_add will be called, which then will
>> add device to sg_sysfs_class. This will cause lockdep warning,
>> please see following email
>>
>> In this case the locks are from diffrent classi, one is sdev_class,
>> another is sg_sysfs_class
>>
>> Here reclassify the sg_sysfs_class for lockdep
>
> This isn't really a generic solution, is it? It only works because we
> currently only have two users of the interface functions, so if we
> reclassify one they look separate to lockdep. It will fall over again
> if we ever get another one.
>
> Surely the correct fix is to initialise lockdep for the mutex the same
> way we did for the semaphore in class_register() (which does exactly the
> same locking without triggering lockdep)? That way we'll also fix the
> problem for other conversions of semaphore->mutex.
Matthew & greg did the work already.
>From my original idea I don't want to do this for all classes, and I
would think it as a rare case.
Regards
dave
next prev parent reply other threads:[~2008-05-29 0:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-27 10:10 [PATCH][-mm] reclassify sg_sysfs_class for lockdep Dave Young
2008-05-28 14:40 ` James Bottomley
2008-05-29 0:45 ` Dave Young [this message]
2008-05-29 3:25 ` James Bottomley
2008-05-28 14:49 ` Matthew Wilcox
2008-05-28 19:18 ` Andrew Morton
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=a8e1da0805281745g31c8217fk860dfe17cc674be5@mail.gmail.com \
--to=hidave.darkstar@gmail.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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;
as well as URLs for NNTP newsgroup(s).