From 20a81e4d178379381fbd522eda5f664ba2ecdaaa Mon Sep 17 00:00:00 2001 From: Yoshiaki Tamura Date: Mon, 21 Jun 2010 17:50:01 +0900 Subject: virtio-blk: fix the list operation in virtio_blk_load(). Although it is really rare to get in to the while loop, the list operation in the loop is obviously wrong. Signed-off-by: Yoshiaki Tamura Signed-off-by: Kevin Wolf --- hw/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw') diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 75878ebe3c..0bf929aba9 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -470,7 +470,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; -- cgit v1.2.3