summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2010-03-02 08:44:34 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-03 19:13:16 +0530
commitbb2d3de1885cd69a5fc92af99c4e0c05eb5fc122 (patch)
treeb791b04ce30406124aff45ed73966572f2955708 /drivers/scsi/sd.c
parent74315ad00b8ed41e9f97fe322942fa9883517ed1 (diff)
downloadop-kernel-dev-bb2d3de1885cd69a5fc92af99c4e0c05eb5fc122.zip
op-kernel-dev-bb2d3de1885cd69a5fc92af99c4e0c05eb5fc122.tar.gz
[SCSI] sd: Fix VPD buffer allocations
Commit e3deec09 incorrectly assumed that the B0 and B1 page lengths were limited to 32 bytes. The B0 VPD page length is defined to be 64 bytes when the device supports thin provisioning. B1 is always defined to be 64 bytes. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 1dd4d84..f999538 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1948,7 +1948,7 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
{
struct request_queue *q = sdkp->disk->queue;
unsigned int sector_sz = sdkp->device->sector_size;
- const int vpd_len = 32;
+ const int vpd_len = 64;
unsigned char *buffer = kmalloc(vpd_len, GFP_KERNEL);
if (!buffer ||
@@ -1998,7 +1998,7 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp)
{
unsigned char *buffer;
u16 rot;
- const int vpd_len = 32;
+ const int vpd_len = 64;
buffer = kmalloc(vpd_len, GFP_KERNEL);
OpenPOWER on IntegriCloud