aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>2010-06-21 17:50:01 +0900
committerKevin Wolf <kwolf@redhat.com>2010-06-22 14:38:02 +0200
commit20a81e4d178379381fbd522eda5f664ba2ecdaaa (patch)
treebd278993b0ad568a38c73b9fdfc3a012911e12cc /hw
parent7d7d975c67aaa48a6aaf1630c143a453606567b1 (diff)
downloadqemu-20a81e4d178379381fbd522eda5f664ba2ecdaaa.zip
qemu-20a81e4d178379381fbd522eda5f664ba2ecdaaa.tar.gz
qemu-20a81e4d178379381fbd522eda5f664ba2ecdaaa.tar.bz2
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 <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-blk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 75878eb..0bf929a 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;