Re: lockdep whine in 2.6.26-rc2-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 19, 2008 at 01:20:33PM +0800, Dave Young wrote:
> On Sat, May 17, 2008 at 6:14 PM, Dave Young <hidave.darkstar@xxxxxxxxx> wrote:
> > On 5/15/08, Matthew Wilcox <matthew@xxxxxx> wrote:
> >> 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.
> >
> > Sorry for my delay. AFAIK, there's no this kind of use.

The question isn't whether there is or isn't this kind of use right now.
The question is whether there might be this kind of use in the future,
and if there is, whether we'd like lockdep to warn us.

> I rechecked the class_interface use, the users are scsi and pcmcia.
> 
> The two classes could call device_add/del while doing
> class_interface_register/unregister is :
> sg_sysfs_class
> pcmcia_socket_class
> 
> So is it possible to reset their lock_class instead of do __mutex_init
> for all classes?

Again, it's not about current usage, it's about future usage.  Why do
you want all sysfs classes to have the same lockdep class?  There can
be good reasons.  For example, if two locks are conceptually the same,
keeping them in the same class helps you find AB-BA problems earlier.

Is there a reason you don't like my idea?

-- 
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."
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux