Inside exec.c, there is a race: ------- static bool prepare_mmio_access(MemoryRegion *mr) { bool unlocked = !qemu_mutex_iothread_locked(); bool release_lock = false;
if (unlocked && mr->global_locking) { qemu_mutex_lock_iothread(); ------ IMHO, checking for unlocked that way is wrong. Should use some kind of _trylock instead?