[kernel] Add patch from Richard W.M. Jones to fix virtio scsi oops (rhbz 847548)

Josh Boyer jwboyer at fedoraproject.org
Tue Aug 21 14:47:46 UTC 2012


commit a78e28b4db91e67b400bd1a59511a0ef9ba0794c
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Aug 21 10:47:07 2012 -0400

    Add patch from Richard W.M. Jones to fix virtio scsi oops (rhbz 847548)

 kernel.spec                                        |    7 +++++
 virtio-scsi-Initialize-scatterlist-structure.patch |   28 ++++++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 39edbfe..5fd90d0 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -749,6 +749,9 @@ Patch22059: uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
 
 Patch22065: fbcon-fix-race-condition-between-console-lock-and-cursor-timer.patch
 
+#rhbz 847548
+Patch22066: virtio-scsi-Initialize-scatterlist-structure.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1441,6 +1444,9 @@ ApplyPatch uvcvideo-Reset-bytesused-field-when-recycling-erroneous-buffer.patch
 
 ApplyPatch fbcon-fix-race-condition-between-console-lock-and-cursor-timer.patch
 
+#rhbz 847548
+ApplyPatch virtio-scsi-Initialize-scatterlist-structure.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2304,6 +2310,7 @@ fi
 #                 ||     ||
 %changelog
 * Tue Aug 21 2012 Josh Boyer <jwboyer at redhat.com>
+- Add patch from Richard W.M. Jones to fix virtio scsi oops (rhbz 847548)
 - Add patch from Dave Airlie to fix fb cursor vs grub2 gfxterm hang
 
 * Mon Aug 20 2012 Josh Boyer <jwboyer at redhat.com> - 3.6.0-0.rc2.git1.1
diff --git a/virtio-scsi-Initialize-scatterlist-structure.patch b/virtio-scsi-Initialize-scatterlist-structure.patch
new file mode 100644
index 0000000..4445d68
--- /dev/null
+++ b/virtio-scsi-Initialize-scatterlist-structure.patch
@@ -0,0 +1,28 @@
+From: "Richard W.M. Jones" <rjones at redhat.com>
+
+The sg struct is used without being initialized.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=847548
+
+Signed-off-by: Richard W.M. Jones <rjones at redhat.com>
+---
+ drivers/scsi/virtio_scsi.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
+index c7030fb..8a66f83 100644
+--- a/drivers/scsi/virtio_scsi.c
++++ b/drivers/scsi/virtio_scsi.c
+@@ -219,7 +219,7 @@ static int virtscsi_kick_event(struct virtio_scsi *vscsi,
+ 	struct scatterlist sg;
+ 	unsigned long flags;
+ 
+-	sg_set_buf(&sg, &event_node->event, sizeof(struct virtio_scsi_event));
++	sg_init_one(&sg, &event_node->event, sizeof(struct virtio_scsi_event));
+ 
+ 	spin_lock_irqsave(&vscsi->event_vq.vq_lock, flags);
+ 
+-- 
+1.7.10.4
+
+  


More information about the scm-commits mailing list