[SCSI] storvsc: Initialize the sglist
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 6 Feb 2013 13:15:28 +0000 (05:15 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 24 Feb 2013 09:24:26 +0000 (09:24 +0000)
Properly initialize scatterlist before using it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/storvsc_drv.c

index 01440782feb2056602a619bbbdb7190d06a7a14a..9f4e5601b6101182ca5651180e136d63cedb69ef 100644 (file)
@@ -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)