From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Dan Carpenter <error27@gmail.com>,
"James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: bug report: sd: off by one in sd_read_block_limits()
Date: Tue, 02 Mar 2010 08:21:41 -0500 [thread overview]
Message-ID: <yq1k4tu2716.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <yq1tysy27ft.fsf@sermon.lab.mkp.net> (Martin K. Petersen's message of "Tue, 02 Mar 2010 08:12:54 -0500")
>>>>> "Martin" == Martin K Petersen <martin.petersen@oracle.com> writes:
Actually, looking closer at the VPD mechanism in e3deec09 we need to fit
the page header as well...
sd: Fix block limits VPD page length
Commit e3deec09 incorrectly assumed that the page length was limited to
32 bytes. The B0 VPD page length is defined to be 64 bytes when the
device supports thin provisioning.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 1dd4d84..72dbac7 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 ||
next prev parent reply other threads:[~2010-03-02 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 8:21 bug report: sd: off by one in sd_read_block_limits() Dan Carpenter
2010-03-02 13:12 ` Martin K. Petersen
2010-03-02 13:21 ` Martin K. Petersen [this message]
2010-03-02 13:31 ` Matthew Wilcox
2010-03-02 13:36 ` Martin K. Petersen
2010-03-02 14:56 ` Matthew Wilcox
2010-03-03 7:08 ` James Bottomley
2010-03-02 13:44 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1k4tu2716.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@suse.de \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox