]> git.ipfire.org Git - thirdparty/qemu.git/commit - cpu-exec.c
cpu-exec: fix lock hierarchy for user-mode emulation
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Aug 2015 09:33:24 +0000 (11:33 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Sep 2015 13:34:56 +0000 (15:34 +0200)
commit9fd1a94888cd6a559f95c3596ec1ac28b74838c1
treececbe1ad9b5c5593e85b6ced7498f5d88f5078ad
parent8fd19e6cfd5b6cdf028c6ac2ff4157ed831ea3a6
cpu-exec: fix lock hierarchy for user-mode emulation

tb_lock has to be taken inside the mmap_lock (example:
tb_invalidate_phys_range is called by target_mmap), but
tb_link_page is taking the mmap_lock and it is called
with the tb_lock held.

To fix this, take the mmap_lock in tb_find_slow, not
in tb_link_page.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
cpu-exec.c
translate-all.c