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

[Xen-devel] [PATCH 27/32] virtio-blk: correctly link new request in virtio_blk_load()



From: Yunlei Ding <yunlei.ding@xxxxxxxxxx>

s->rq should be set with req instead of req-next.

Signed-off-by: Yunlei Ding <yunlei.ding@xxxxxxxxxx>
Coverity-ID: 1055910
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 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 fcf893a..f3a81e3 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -288,7 +288,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int 
version_id)
         VirtIOBlockReq *req = virtio_blk_alloc_request(s);
         qemu_get_buffer(f, (unsigned char*)&req->elem, sizeof(req->elem));
         req->next = s->rq;
-        s->rq = req->next;
+        s->rq = req;
     }
 
     return 0;
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.