From patchwork Mon Jun 21 08:50:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshiaki Tamura X-Patchwork-Id: 56294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 52209B7D80 for ; Mon, 21 Jun 2010 18:52:50 +1000 (EST) Received: from localhost ([127.0.0.1]:52290 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQckJ-0001sd-Ep for incoming@patchwork.ozlabs.org; Mon, 21 Jun 2010 04:52:47 -0400 Received: from [140.186.70.92] (port=40688 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQci7-0001Yb-Cl for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:50:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQci5-00049o-U7 for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:50:31 -0400 Received: from sh.osrg.net ([192.16.179.4]:53327) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQci5-000494-DL for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:50:29 -0400 Received: from fs.osrg.net (postfix@fs.osrg.net [10.0.0.12]) by sh.osrg.net (8.14.3/8.14.3/OSRG-NET) with ESMTP id o5L8oNA2022357; Mon, 21 Jun 2010 17:50:23 +0900 Received: from localhost (hype-wd0.osrg.net [10.72.1.16]) by fs.osrg.net (Postfix) with ESMTP id 535703E028F; Mon, 21 Jun 2010 17:50:23 +0900 (JST) From: Yoshiaki Tamura To: qemu-devel@nongnu.org Date: Mon, 21 Jun 2010 17:50:01 +0900 Message-Id: <1277110201-17778-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> X-Mailer: git-send-email 1.7.0.31.g1df487 X-Dispatcher: imput version 20070423(IM149) Lines: 24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (sh.osrg.net [192.16.179.4]); Mon, 21 Jun 2010 17:50:24 +0900 (JST) X-Virus-Scanned: clamav-milter 0.96.1 at sh X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: aliguori@us.ibm.com, Yoshiaki Tamura Subject: [Qemu-devel] [PATCH] virtio-blk: fix the list operation in virtio_blk_load(). X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- hw/virtio-blk.c | 2 +- 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;