From patchwork Mon Nov 9 18:04:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saul Tamari X-Patchwork-Id: 58823 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA9I4pw9018175 for ; Mon, 9 Nov 2009 18:04:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132AbZKISEg (ORCPT ); Mon, 9 Nov 2009 13:04:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753019AbZKISEg (ORCPT ); Mon, 9 Nov 2009 13:04:36 -0500 Received: from mail-ew0-f207.google.com ([209.85.219.207]:63019 "EHLO mail-ew0-f207.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbZKISEf (ORCPT ); Mon, 9 Nov 2009 13:04:35 -0500 Received: by ewy3 with SMTP id 3so3380874ewy.37 for ; Mon, 09 Nov 2009 10:04:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=+aoYWtkHVfEMJEt0hPj9gIiPRc0Xb6TgQ+xiGGVcb4U=; b=IDdLFgAZ2j3mLlx3l6fgCQUGuOPEDk/0hrmFsKa4qM2aaahGD7em4bzc2nPNMs43C5 dvqBzcCo7e48hecorj9lCuYGmI6km7Vw2cqAuriijPA7noN8bh/2ej5dwaJ5lVQhYeQ6 pLA3aePw6z4F/56icXfrGHZ7uBF0ieGKOZCIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=JK02sRqik9DjHDJw+4MXxd1Fkwi10VxAwEZg+ijnefefg0IV+r2uC9Dkm6u52iWlUN 5ahV1P2m6VjF1blzvbTBwFHb/DLwrtzwxpBk4PFJMFQd99mPZJJlVtMmYZZKvnWNCkEb RjGHjtzQRnMEiG4WIKd2ExFSsjsYD3UvuRf8w= MIME-Version: 1.0 Received: by 10.213.1.28 with SMTP id 28mr3653886ebd.70.1257789874213; Mon, 09 Nov 2009 10:04:34 -0800 (PST) Date: Mon, 9 Nov 2009 20:04:34 +0200 Message-ID: <41be791c0911091004x62d30fbey91ef730475ba3571@mail.gmail.com> Subject: [PATCH] qemu-kvm: clear only essential parts of VirtIOBlockReq on object allocation - RESUBMIT From: Saul Tamari To: qemu-devel@nongnu.org, kvm@vger.kernel.org Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 2630b99..de74b00 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -79,12 +79,13 @@ static inline void virtio_identify_template(struct virtio_blk_config *bc) typedef struct VirtIOBlockReq { VirtIOBlock *dev; - VirtQueueElement elem; struct virtio_blk_inhdr *in; struct virtio_blk_outhdr *out; struct virtio_scsi_inhdr *scsi; QEMUIOVector qiov; struct VirtIOBlockReq *next; + /* Members that need clearing, must be added prior to elem */ + VirtQueueElement elem; } VirtIOBlockReq;