diff options
author | Pierrick Bouvier <pierrick.bouvier@linaro.org> | 2024-10-25 10:58:57 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-11-16 08:42:25 -0800 |
commit | 779f30a01af8566780cefc8639505b758950afb3 (patch) | |
tree | 71a6ca3e2084794476c1b80f86986b222f66ecd7 /cpu-common.c | |
parent | 7ba055b49b74c4d2f4a338c5198485bdff373fb1 (diff) |
cpu: ensure we don't call start_exclusive from cpu_exec
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>
Diffstat (limited to 'cpu-common.c')
-rw-r--r-- | cpu-common.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |