diff mbox series

[PULL,06/14] cpu: ensure we don't call start_exclusive from cpu_exec

Message ID 20241115205849.266094-7-richard.henderson@linaro.org
State New
Headers show
Series [PULL,01/14] linux-user: Fix setreuid and setregid to use direct syscalls | expand

Commit Message

Richard Henderson Nov. 15, 2024, 8:58 p.m. UTC
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241025175857.2554252-3-pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 cpu-common.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/cpu-common.c b/cpu-common.c
index 6b262233a3..0d607bbe49 100644
--- a/cpu-common.c
+++ b/cpu-common.c
@@ -194,6 +194,9 @@  void start_exclusive(void)
     CPUState *other_cpu;
     int running_cpus;
 
+    /* Ensure we are not running, or start_exclusive will be blocked. */
+    g_assert(!current_cpu->running);
+
     if (current_cpu->exclusive_context_count) {
         current_cpu->exclusive_context_count++;
         return;