From: Yoshiaki Tamura Date: Mon, 21 Jun 2010 08:50:01 +0000 (+0900) Subject: virtio-blk: fix the list operation in virtio_blk_load(). X-Git-Tag: v0.13.0-rc0~197 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20a81e4d178379381fbd522eda5f664ba2ecdaaa;p=thirdparty%2Fqemu.git 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 --- diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 75878ebe3c7..0bf929aba91 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;