Patch Upstream: [SCSI] storvsc: Initialize the sglist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit: 9d2696e658ef4f209955ddaa987d43f1a1bd81a1
From: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>
Date: Wed, 6 Feb 2013 05:15:28 -0800
Subject: [SCSI] storvsc: Initialize the sglist

Properly initialize scatterlist before using it.

Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: James Bottomley <JBottomley@xxxxxxxxxxxxx>
---
 drivers/scsi/storvsc_drv.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 0144078..9f4e560 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -467,6 +467,7 @@ static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl,
 	if (!bounce_sgl)
 		return NULL;
 
+	sg_init_table(bounce_sgl, num_pages);
 	for (i = 0; i < num_pages; i++) {
 		page_buf = alloc_page(GFP_ATOMIC);
 		if (!page_buf)
-- 
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]