Received: from eggs.gnu.org ([2001:4830:134:3::10]:44033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWA5-0006BW-5z for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boWA3-0004su-1Q for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boWA2-0004so-RC for qemu-devel@nongnu.org; Mon, 26 Sep 2016 09:41:34 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 541A97F6A4 for ; Mon, 26 Sep 2016 13:41:34 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-31.ams2.redhat.com [10.36.112.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8QDexe7009350 for ; Mon, 26 Sep 2016 09:41:33 -0400 From: Paolo Bonzini Date: Mon, 26 Sep 2016 15:40:47 +0200 Message-Id: <1474897258-1205-18-git-send-email-pbonzini@redhat.com> In-Reply-To: <1474897258-1205-1-git-send-email-pbonzini@redhat.com> References: <1474897258-1205-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 17/28] cpus-common: fix uninitialized variable use in run_on_cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- cpus-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 2005bfe..d6cd426 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -88,8 +88,7 @@ struct qemu_work_item { struct qemu_work_item *next; run_on_cpu_func func; void *data; - int done; - bool free; + bool free, done; }; =20 static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi) @@ -120,6 +119,7 @@ void do_run_on_cpu(CPUState *cpu, run_on_cpu_func fun= c, void *data, =20 wi.func =3D func; wi.data =3D data; + wi.done =3D false; wi.free =3D false; =20 queue_work_on_cpu(cpu, &wi); --=20 2.7.4