Re: [PATCH] zfcp: Test kmalloc failure in scsi_get_vpd_page()

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

 



On 11/05/2009 09:41 PM, James Bottomley wrote:
> On Thu, 2009-11-05 at 10:29 +0200, Boaz Harrosh wrote:
>> On 11/04/2009 07:50 PM, James Bottomley wrote:
>>> On Wed, 2009-11-04 at 18:18 +0200, Boaz Harrosh wrote:
>>>
>>> The point of checking is not to send a VPD inquiry to USB devices that
>>> don't support it.  These have a very limited range of supported VPD
>>> pages.
>>>
>>
>> OK thanks. But maybe just define a MIN_INQUIRY_SIZE instead of hard
>> coded 32 everywhere, and use that. So in future if such a device is
>> found we can easily change it.
> 
> So the minimum inquiry size would actually be 36 ... from
> scsi_scan.c ... and that's hard coded to a value too.
> 

two wrongs don't make a right ;-) But yes, sorry, that's a wrong name.
I meant minimum-vpd-page-inquiry, a specifc constant for that function
we are talking about.

>> (Never say never ;-))
> 
> I'm hoping that by the time USB devices get complex enough to need more
> than 28 VPD pages, they've actually discovered what conforming to the
> standards means.
> 

I don't understand what your saying. I'm making a simple and sane point.
A new comer, from looking at the API, will say "Haa I only need 12 bytes
lets set that". But no the buffer has dual purpose, one get the page I want,
but zero check these crap USB devices. (And all those other subtle things)
So you are actually going to argue that a patch should introduce an
hard coded 32 unexplained, and refuse a constant that actually communicates
the issue, which also covers our asses from the hopes we make.
Because I sure hope so too, but I'm also 48 years old.

> James
> 
> 

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