Re: device removal causes "sysfs: can not remove 'bsg', no directory"

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

 



Dan Williams <dan.j.williams@xxxxxxxxx> writes:

> On Fri, Feb 3, 2012 at 8:02 PM, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote:
>> Bjorn Helgaas <bhelgaas@xxxxxxxxxx> writes:
>>
>>> Eric recently added ce59791936, which is a check that complains if we
>>> try to remove files from non-existent directories.
>>
>> Yes.  It has always been a bug but since no one checked their error
>> codes it has been going unnoticed.
>>
>>> When I remove a device (LSI SAS2008 in this case, but I don't know if
>>> it's specific to that), I hit that warning three times.  Let me know
>>> if I can collect any more data.
>>
>> I tried to read that code and understand what is going on but I don't
>> know enough about the block and scsi layers to have a clue where to
>> start.
>>
>> bsg_unregister_queue seems to be a generic piece of infrastructure.
>>
>> q->kobj seems to be managed separately from  q->bsg_dev->class_dev.
>>
>> If I read q->kobj correctly that is managed with blk_put_queue.
>>
>> So it seems like the final blk_put_queue or blk_unregister_queue is
>> being called before bsg_unregister_queue and causing this problem.
>>
>> What the solution might be I can't believe to figure out.
>
> This fixed it for me:
>
> https://lkml.org/lkml/2012/2/8/246

It is good to see that there is a fix.  But using an internal sysfs
field like that is a bit scary.

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