projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2042043
)
kvm_init_vcpu requires global lock held
author
Marcelo Tosatti
<mtosatti@redhat.com>
Tue, 23 Mar 2010 16:37:13 +0000
(13:37 -0300)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Mon, 26 Apr 2010 14:28:35 +0000
(11:28 -0300)
Since it accesses data protected by the lock.
Signed-off-by: Avi Kivity <avi@redhat.com>
cpus.c
patch
|
blob
|
history
diff --git
a/cpus.c
b/cpus.c
index 8450ee4ff4d7b0bbe3db6f057294a32137ca6ecf..2bf87d2d5ea3e91366ba71fe2bc7f6c7c4580f0d 100644
(file)
--- a/
cpus.c
+++ b/
cpus.c
@@
-401,6
+401,7
@@
static void *kvm_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
+ qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_self(env->thread);
if (kvm_enabled())
kvm_init_vcpu(env);
@@
-408,7
+409,6
@@
static void *kvm_cpu_thread_fn(void *arg)
kvm_block_io_signals(env);
/* signal CPU creation */
- qemu_mutex_lock(&qemu_global_mutex);
env->created = 1;
qemu_cond_signal(&qemu_cpu_cond);