[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <62d80e38ed89ca1e7dc9424c7c4438d46be924d9.1442326825.git.jslaby@suse.cz>
Date: Tue, 15 Sep 2015 16:22:21 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
James Smart <james.smart@...gotech.com>,
Dick Kennedy <dick.kennedy@...gotech.com>,
James Bottomley <JBottomley@...n.com>,
Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 26/33] lpfc: Fix scsi prep dma buf error.
From: James Smart <james.smart@...gotech.com>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 5116fbf136ea21b8678a85eee5c03508736ada9f upstream.
Didn't check for less-than-or-equal zero. Means we may later call
scsi_dma_unmap() even though we don't have valid mappings.
Signed-off-by: Dick Kennedy <dick.kennedy@...gotech.com>
Signed-off-by: James Smart <james.smart@...gotech.com>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Signed-off-by: James Bottomley <JBottomley@...n.com>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
drivers/scsi/lpfc/lpfc_scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index c913e8cc3b26..ed7759980c47 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3423,7 +3423,7 @@ lpfc_scsi_prep_dma_buf_s4(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd)
*/
nseg = scsi_dma_map(scsi_cmnd);
- if (unlikely(!nseg))
+ if (unlikely(nseg <= 0))
return 1;
sgl += 1;
/* clear the last flag in the fcp_rsp map entry */
--
2.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists