<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From be4525e2db8626fa0cd5cdf0ca9ae52e8fbf6369 Mon Sep 17 00:00:00 2001
Message-Id: &lt;be4525e2db8626fa0cd5cdf0ca9ae52e8fbf6369.1433306137.git.jen@redhat.com&gt;
In-Reply-To: &lt;34921ae37a632e1d6a2bdfe4893684dec8eafba4.1433306137.git.jen@redhat.com&gt;
References: &lt;34921ae37a632e1d6a2bdfe4893684dec8eafba4.1433306137.git.jen@redhat.com&gt;
From: Jeffrey Cody &lt;jcody@redhat.com&gt;
Date: Tue, 2 Jun 2015 04:53:49 -0400
Subject: [CHANGE 2/2] vdi: Initialize acb-&gt;bh in vdi_aio_setup().
To: rhvirt-patches@redhat.com,
    jen@redhat.com

RH-Author: Jeffrey Cody &lt;jcody@redhat.com&gt;
Message-id: &lt;d5a11cb6327d1097381ec5536a446f9b31450464.1433220006.git.jcody@redhat.com&gt;
Patchwork-id: 65245
O-Subject: [RHEL-6.7 qemu-kvm PATCH 2/2] vdi: Initialize acb-&gt;bh in vdi_aio_setup().
Bugzilla: 1130046
RH-Acked-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
RH-Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
RH-Acked-by: Fam Zheng &lt;famz@redhat.com&gt;

The VDI driver incorrectly relied on qemu_aio_get() to return a
zero-filled buffer.  Commit b9900cb7f changed the qemu_aio_get()
behavior to use g_slice_alloc(), which causes VDI to return -EIO as the
acb-&gt;bh is not NULL when checked in vdi_schedule_bh().

This is not an issue upstream, as once the patch to convert
qemu_aio_get() to g_slice_alloc() was committed, the vdi driver was
already converted to coroutines, and no longer managed its own bounce
buffers.

Downstream only.

Signed-off-by: Jeff Cody &lt;jcody@redhat.com&gt;
---
 block/vdi.c | 1 +
 1 file changed, 1 insertion(+)

Signed-off-by: Jeff E. Nelson &lt;jen@redhat.com&gt;
---
 block/vdi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/vdi.c b/block/vdi.c
index 430c392..224e642 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -514,6 +514,7 @@ static VdiAIOCB *vdi_aio_setup(BlockDriverState *bs, int64_t sector_num,
         acb-&gt;sector_num = sector_num;
         acb-&gt;qiov = qiov;
         acb-&gt;is_write = is_write;
+        acb-&gt;bh = NULL;
 
         if (qiov-&gt;niov &gt; 1) {
             acb-&gt;buf = qemu_blockalign(bs, qiov-&gt;size);
-- 
2.1.0

</pre></body></html>