[kernel] r16706 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Tue Dec 14 03:03:08 UTC 2010
Author: benh
Date: Tue Dec 14 03:02:55 2010
New Revision: 16706
Log:
mpt2sas: Fix incorrect scsi_dma_map error checking (Closes: #606968)
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-mpt2sas-fix-incorrect-scsi_dma_map-error-check.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/30
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Sun Dec 12 14:55:10 2010 (r16705)
+++ dists/sid/linux-2.6/debian/changelog Tue Dec 14 03:02:55 2010 (r16706)
@@ -2,6 +2,7 @@
[ Ben Hutchings ]
* NFS: Fix panic after nfs_umount()
+ * mpt2sas: Fix incorrect scsi_dma_map error checking (Closes: #606968)
[ maximilian attems ]
* [openvz] Reenable NF_CONNTRACK_IPV6.
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-mpt2sas-fix-incorrect-scsi_dma_map-error-check.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/SCSI-mpt2sas-fix-incorrect-scsi_dma_map-error-check.patch Tue Dec 14 03:02:55 2010 (r16706)
@@ -0,0 +1,49 @@
+From: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+Date: Tue, 9 Mar 2010 11:09:50 +0900
+Subject: [PATCH] [SCSI] mpt2sas: fix the incorrect scsi_dma_map error checking
+
+commit bb789d01620e5d36081b22edb6fb71cf55ff043c upstream.
+
+scsi_dma_map() returns -1 if an error occurred (zero means that the
+command has no data). So the following current code can't catch an
+error:
+
+sges_left = scsi_dma_map(scmd);
+if (!sges_left) {
+ sdev_printk(KERN_ERR, scmd->device, "pci_map_sg"
+ " failed: request for %d bytes!\n", scsi_bufflen(scmd));
+ return -ENOMEM;
+}
+
+Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
+Acked-by: "Desai, Kashyap" <Kashyap.Desai at lsi.com>
+Signed-off-by: James Bottomley <James.Bottomley at suse.de>
+---
+ drivers/scsi/mpt2sas/mpt2sas_scsih.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+index be171ed..aa67b75 100644
+--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+@@ -988,7 +988,7 @@ _scsih_build_scatter_gather(struct MPT2SAS_ADAPTER *ioc,
+ u32 chain_offset;
+ u32 chain_length;
+ u32 chain_flags;
+- u32 sges_left;
++ int sges_left;
+ u32 sges_in_segment;
+ u32 sgl_flags;
+ u32 sgl_flags_last_element;
+@@ -1009,7 +1009,7 @@ _scsih_build_scatter_gather(struct MPT2SAS_ADAPTER *ioc,
+
+ sg_scmd = scsi_sglist(scmd);
+ sges_left = scsi_dma_map(scmd);
+- if (!sges_left) {
++ if (sges_left < 0) {
+ sdev_printk(KERN_ERR, scmd->device, "pci_map_sg"
+ " failed: request for %d bytes!\n", scsi_bufflen(scmd));
+ return -ENOMEM;
+--
+1.7.2.3
+
Modified: dists/sid/linux-2.6/debian/patches/series/30
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/30 Sun Dec 12 14:55:10 2010 (r16705)
+++ dists/sid/linux-2.6/debian/patches/series/30 Tue Dec 14 03:02:55 2010 (r16706)
@@ -1 +1,2 @@
+ bugfix/all/NFS-Fix-panic-after-nfs_umount.patch
++ bugfix/all/SCSI-mpt2sas-fix-incorrect-scsi_dma_map-error-check.patch
More information about the Kernel-svn-changes
mailing list