Re: [PATCH] scsi_transport_fc: Initialize sysfs attributes with sysfs_attr_init

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

 



On Tue, Mar 16, 2010 at 01:49:04PM -0700, James Bottomley wrote:
> On Tue, 2010-03-16 at 15:48 -0500, Mike Christie wrote:
> > On 03/16/2010 05:14 AM, Christof Schmitt wrote:
> > > With the new lockdep tracking in sysfs, sysfs_attr_init has to be used
> > > for initializing all non-static sysfs attributes. Otherwise, lockdep
> > > will warn about the missing initialization with:
> > >
> > > Mar 15 09:19:49 t6345029 kernel: BUG: key 000000002f5ae350 not in .data!
> > > Mar 15 09:19:49 t6345029 kernel: BUG: key 000000002f5ae388 not in .data!
> > > Mar 15 09:19:49 t6345029 kernel: BUG: key 000000002f5ae3c0 not in .data!
> > > Mar 15 09:19:49 t6345029 kernel: BUG: key 000000002f5ae3f8 not in .data!
> > >
> > 
> > I think iscsi needs this too, but I am not see this error message. I 
> > just tried iscsi and fc/lpfc with linus's tree and did not see those 
> > errors for either. What .config settings do I need for this? I have:
> 
> It's a lot worse than that ... every transport class plus some of the
> core attributes will need this.
> 
> > CONFIG_LOCKDEP=y
> > CONFIG_DEBUG_LOCKDEP=y
> > 
> > are there other lockdep settings?
> 
> I also don't see a problem in my systems, so I'd appreciate an answer to
> this too.

include/linux/sysfs.h uses CONFIG_DEBUG_LOCK_ALLOC in some places,
e.g.
#ifdef CONFIG_DEBUG_LOCK_ALLOC
#define sysfs_attr_init(attr)				\
do {							\
	static struct lock_class_key __key;		\
							\
	(attr)->key = &__key;				\
} while(0)
#else
#define sysfs_attr_init(attr) do {} while(0)
#endif

So, enabling CONFIG_DEBUG_LOCK_ALLOC should show this problem. I
always use CONFIG_PROVE_LOCKING to enable the lock dependency
checker.

Christof
--
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