qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] sparc32 fix np dereference in do_unassigned_access
@ 2010-01-22 21:31 Artyom Tarasenko
  2010-01-23  8:14 ` [Qemu-devel] " Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Artyom Tarasenko @ 2010-01-22 21:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Artyom Tarasenko

fix a potential null pointer dereference introduced in
commit	576c2cdc767ab9e2dc038fa4c99f22e53287a3de

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
---
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,
         else
             raise_exception(TT_DATA_ACCESS);
     }
-    env = saved_env;
 
     /* flush neverland mappings created during no-fault mode,
        so the sequential MMU faults report proper fault types */
     if (env->mmuregs[0] & MMU_NF) {
         tlb_flush(env, 1);
     }
+
+    env = saved_env;
 }
 #else
 void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-23  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-22 21:31 [Qemu-devel] sparc32 fix np dereference in do_unassigned_access Artyom Tarasenko
2010-01-23  8:14 ` [Qemu-devel] " Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).