From patchwork Wed Jul 18 15:07:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC,v9,24/27] virtio-blk: fix incorrect length Date: Wed, 18 Jul 2012 05:07:51 -0000 From: Stefan Hajnoczi X-Patchwork-Id: 171711 Message-Id: <1342624074-24650-25-git-send-email-stefanha@linux.vnet.ibm.com> To: Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi , kvm@vger.kernel.org, "Michael S. Tsirkin" , Khoa Huynh , Paolo Bonzini , Asias He Signed-off-by: Stefan Hajnoczi --- hw/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8734029..cff2298 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -131,7 +131,7 @@ static void complete_one_request(VirtIOBlockRequest *req, VirtIOBlock *s, ssize_ * written to, but for virtio-blk it seems to be the number of bytes * transferred plus the status bytes. */ - vring_push(&s->vring, req->head, len + sizeof req->status); + vring_push(&s->vring, req->head, len + sizeof(*req->status)); } static bool is_request_merged(VirtIOBlockRequest *req)