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: pull-nvme-20200902~11508 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=20a81e4d178379381fbd522eda5f664ba2ecdaaa;p=qemu-nvme.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 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;