Re: scsi_host_alloc does not check for used shost->host_no

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

 



On Tue, 2008-07-15 at 14:25 -0600, Matthew Wilcox wrote:
> > Do we need to worry about a host in the SHOST_DEL state? In that case, it will still
> > exist to some degree, but scsi_host_get will fail. For example, what happens if a
> > shell is in /sys/class/scsi_host/host5/ and you delete host 5 and try to add another.
> > Couldn't you run into the same problem? In that case the scsi_host_get will fail.
> > I suppose you could check specifically for -ENXIO getting returned...
> 
> Or we could make the host_no a u64 and avoid the problem ever happening
> in our lifetimes.  I'm amazed that anyone's had the time to do 4 billion
> add/removes, to be honest.  Assuming it takes 1 second per add/remove
> cycle, and there's not even time to scan a bus in that time, that's
> still 136 years.

Actually, right at the moment, a lot of the udev stuff is conditioned on
a non repeating host number (which is why we don't use idr like we do
for the other things).  I'm really reluctant to go to a u64 host
number ... what was the use case that produced this problem?

James


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