Re: bug report: sd: off by one in sd_read_block_limits()

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

 



James,

While I agree the original VPD code's double kmalloc() was a bit of a
wart at least it did the right thing because it allocated a suitably
sized buffer for page 0.

My concern with the interface you introduced in e3deec09 is that for
devices that support a large number of VPD pages we won't be able to fit
the page list in the allocated buffer.  And callers are likely to pick a
buffer size that makes sense for the VPD page they are interested in.
It's not a big deal in the block limits/block device characteristics
case because they are big enough.

But at the very minimum that interface should come with a big fat
warning in the comment section that describes that the page list must
also be able to fit.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
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