Re: [PATCH][-mm] reclassify sg_sysfs_class for lockdep

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

 



On Wed, May 28, 2008 at 10:40 PM, James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> 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
--
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