SCSI: Don't attempt to send extended INQUIRY command if skip_vpd_pages is set (Closes: #719002)

svn path=/dists/sid/linux/; revision=20454
This commit is contained in:
Ben Hutchings 2013-08-07 20:37:28 +00:00
parent bb5207710b
commit d94d501ae1
3 changed files with 36 additions and 0 deletions

2
debian/changelog vendored
View File

@ -82,6 +82,8 @@ linux (3.10.5-1) UNRELEASED; urgency=low
* [rt] genpatch.py: Fix parsing of upstream patches with no header
* aufs: Update to aufs3.10-20130805
* [rt] md: Disable BCACHE, as it fails to build
* SCSI: Don't attempt to send extended INQUIRY command if skip_vpd_pages is
set (Closes: #719002)
-- Ben Hutchings <ben@decadent.org.uk> Tue, 30 Jul 2013 18:09:20 +0200

View File

@ -0,0 +1,33 @@
From: "Martin K. Petersen" <martin.petersen@oracle.com>
Date: Tue, 30 Jul 2013 22:58:34 -0400
Subject: [SCSI] Don't attempt to send extended INQUIRY command if
skip_vpd_pages is set
Origin: https://git.kernel.org/cgit/linux/kernel/git/jejb/scsi.git/commit?id=7562523e84ddc742fe1f9db8bd76b01acca89f6b
Bug-Debian: http://bugs.debian.org/719002
If a device has the skip_vpd_pages flag set we should simply fail the
scsi_get_vpd_page() call.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Stuart Foster <smf.linux@ntlworld.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
---
drivers/scsi/scsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 3b1ea34..eaa808e 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1031,6 +1031,9 @@ int scsi_get_vpd_page(struct scsi_device *sdev, u8 page, unsigned char *buf,
{
int i, result;
+ if (sdev->skip_vpd_pages)
+ goto fail;
+
/* Ask for all the pages supported by this device */
result = scsi_vpd_inquiry(sdev, buf, 0, buf_len);
if (result)

View File

@ -113,3 +113,4 @@ bugfix/m68k/ethernat-kconfig.patch
bugfix/all/nl80211-fix-another-nl80211_fam-attrbuf-race.patch
bugfix/all/ext4-fix-retry-handling-in-ext4_ext_truncate.patch
bugfix/all/atl1c-Fix-misuse-of-netdev_alloc_skb-in-refilling-rx.patch
bugfix/all/SCSI-Don-t-attempt-to-send-extended-INQUIRY-command-.patch