From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQkMx-0003fo-S2 for qemu-devel@nongnu.org; Wed, 25 Feb 2015 17:23:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQkMt-00061S-SB for qemu-devel@nongnu.org; Wed, 25 Feb 2015 17:23:51 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39030 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQkMt-00061O-Ek for qemu-devel@nongnu.org; Wed, 25 Feb 2015 17:23:47 -0500 Message-ID: <54EE4B71.4090400@suse.de> Date: Wed, 25 Feb 2015 23:23:45 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1424894306-26740-1-git-send-email-ehabkost@redhat.com> <1424894306-26740-9-git-send-email-ehabkost@redhat.com> In-Reply-To: <1424894306-26740-9-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , Peter Maydell Cc: Paolo Bonzini , qemu-devel@nongnu.org Am 25.02.2015 um 20:58 schrieb Eduardo Habkost: > This was the only caller of cpu_init() that was not checking for NULL > yet. >=20 > Reviewed-by: Paolo Bonzini > Signed-off-by: Eduardo Habkost > --- > linux-user/main.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > diff --git a/linux-user/main.c b/linux-user/main.c > index d92702a..111c1ff 100644 > --- a/linux-user/main.c > +++ b/linux-user/main.c > @@ -3453,10 +3453,17 @@ CPUArchState *cpu_copy(CPUArchState *env) > { > CPUState *cpu =3D ENV_GET_CPU(env); > CPUArchState *new_env =3D cpu_init(cpu_model); > - CPUState *new_cpu =3D ENV_GET_CPU(new_env); > + CPUState *new_cpu; > CPUBreakpoint *bp; > CPUWatchpoint *wp; > =20 > + if (!new_env) { > + fprintf(stderr, "cpu_copy: Failed to create new CPU\n"); > + exit(1); > + } > + > + new_cpu =3D ENV_GET_CPU(new_env); > + > /* Reset non arch specific state */ > cpu_reset(new_cpu); > =20 This one seems a genuine bug fix independent of your remodeling. I would've expected that to go through Riku's/Peter's or my qom-cpu tree, with Cc: qemu-stable@nongnu.org. Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)