Re: Bug when rescanning partitions on -ENOMEDIA

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

 



On Thu, Feb 16, 2012 at 11:23:22AM -0500, Alan Stern wrote:
> Tejun:
> 
> Please take a look at this thread:
> 
> 	http://marc.info/?t=132214525000001&r=1&w=2
> 
> Evidently your commit 1196f8b814f32cd04df334abf47648c2a9fd8324 (block: 
> rescan partitions on invalidated devices on -ENOMEDIA too) is causing 
> crashes.  The problem is that the partition scanning code calls 
> sd_revalidate_disk() after the underlying scsi_disk structure has been 
> deallocated.
> 
> There have been numerous bug reports filed on multiple Bugzillas about 
> this, for example, 
> 
> 	https://bugzilla.redhat.com/show_bug.cgi?id=754518
> 
> I don't know the right way to fix this, but it looks like there needs
> to be some synchronization between del_gendisk() and
> rescan_partitions().
> 
> Or maybe you think the synchronization should be done in the SCSI layer 
> instead.  But then what about non-SCSI users of the block layer?  Does 
> the block layer guarantee that it won't call methods in disk->fops 
> after del_gendisk() has returned?

No, the problem is that I used rescan_partitions() instead of
non-existing drop_partitions_and_truncate_disk().  Please read the
following thread.  Jun'ichi Nomura already proposed a patch.

 http://thread.gmane.org/gmane.linux.kernel/1250235/

Thanks.

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