Do not allow changes to the set of cpus and memory regions
while we are dumping core.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
}
/* read and fill status of all threads */
- WITH_QEMU_LOCK_GUARD(&qemu_cpu_list_lock) {
- CPU_FOREACH(cpu) {
- if (cpu == thread_cpu) {
- continue;
- }
- fill_thread_info(info, cpu_env(cpu));
+ CPU_FOREACH(cpu) {
+ if (cpu == thread_cpu) {
+ continue;
}
+ fill_thread_info(info, cpu_env(cpu));
}
}
return 0;
}
+ cpu_list_lock();
+ mmap_lock();
+
/*
* Walk through target process memory mappings and
* set up structure containing this information. After
out:
ret = -errno;
+ mmap_unlock();
+ cpu_list_unlock();
free_note_info(&info);
vma_delete(&mm);
close(fd);