From: KONRAD Frederic <fred.kon...@greensocs.com>

We might have a race here. If current_cpu is about to be set then cpu_exit won't
be called and we don't exit TCG. This was probably an issue with old
implementation as well.

Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com>
---
 cpus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index 2c5ca72..f61530c 100644
--- a/cpus.c
+++ b/cpus.c
@@ -674,8 +674,7 @@ static void cpu_signal(int sig)
         cpu_exit(current_cpu);
     }
 
-    /* FIXME: We might want to check if the cpu is running? */
-    tcg_thread_cpu->exit_request = true;
+    cpu_exit(tcg_thread_cpu);
 }
 
 #ifdef CONFIG_LINUX
-- 
1.9.0


Reply via email to