Re: [PATCH 16/23] scsi: Add scsi_vpd_lun_id()

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

 



On 09/22/2015 09:17 PM, Ewan Milne wrote:
[ .. ]
> 
> scsi_vpd_lun_id() is an exported function, but does not check if sdev->vpd_pg83 != NULL
> (i.e. no VPD 83 info), and we will crash if it is NULL.  Also, why return -EAGAIN?
> What will be different next time?  Maybe a different errno would be better, like
> -ENOENT or -ENODATA, I'm not sure.
> 
> In the SCSI name string case, if the name has to be truncated to fit the supplied buffer,
> scsi_vpd_lun_id() does not ensure that the last byte is zero, it relies on the caller to
> have done this, (which alua_check_vpd() does not do).  I'm not sure if we should truncate
> the SCSI name string here or return an error here, as a truncated name will likely not
> be unique.
> 
I've now updated the description, and decreased the priority if the
SCSI name descriptor is truncated. With that any other descriptor
will have preference if the SCSI name descriptor is truncated.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
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