From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NYb8z-0003w5-8a for qemu-devel@nongnu.org; Sat, 23 Jan 2010 03:14:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NYb8u-0003sp-G0 for qemu-devel@nongnu.org; Sat, 23 Jan 2010 03:14:56 -0500 Received: from [199.232.76.173] (port=39076 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NYb8u-0003sh-BX for qemu-devel@nongnu.org; Sat, 23 Jan 2010 03:14:52 -0500 Received: from mx20.gnu.org ([199.232.41.8]:56203) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NYb8t-0000hO-Ru for qemu-devel@nongnu.org; Sat, 23 Jan 2010 03:14:52 -0500 Received: from mail-pz0-f190.google.com ([209.85.222.190]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NYb8t-0003mO-9C for qemu-devel@nongnu.org; Sat, 23 Jan 2010 03:14:51 -0500 Received: by pzk28 with SMTP id 28so627859pzk.4 for ; Sat, 23 Jan 2010 00:14:50 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1264195913-10897-1-git-send-email-atar4qemu@google.com> References: <1264195913-10897-1-git-send-email-atar4qemu@google.com> From: Blue Swirl Date: Sat, 23 Jan 2010 08:14:30 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: sparc32 fix np dereference in do_unassigned_access List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel@nongnu.org, Artyom Tarasenko Thanks, applied. On Fri, Jan 22, 2010 at 9:31 PM, Artyom Tarasenko wrote: > fix a potential null pointer dereference introduced in > commit =C2=A0576c2cdc767ab9e2dc038fa4c99f22e53287a3de > > Signed-off-by: Artyom Tarasenko > --- > diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c > index ce8c6f1..eb4f5a4 100644 > --- a/target-sparc/op_helper.c > +++ b/target-sparc/op_helper.c > @@ -3761,13 +3761,14 @@ void do_unassigned_access(target_phys_addr_t addr= , int is_write, int is_exec, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 else > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 raise_exception(TT_DATA_ACCESS)= ; > =C2=A0 =C2=A0 } > - =C2=A0 =C2=A0env =3D saved_env; > > =C2=A0 =C2=A0 /* flush neverland mappings created during no-fault mode, > =C2=A0 =C2=A0 =C2=A0 =C2=A0so the sequential MMU faults report proper fau= lt types */ > =C2=A0 =C2=A0 if (env->mmuregs[0] & MMU_NF) { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 tlb_flush(env, 1); > =C2=A0 =C2=A0 } > + > + =C2=A0 =C2=A0env =3D saved_env; > =C2=A0} > =C2=A0#else > =C2=A0void do_unassigned_access(target_phys_addr_t addr, int is_write, in= t is_exec, >