commit | 9fd1a94888cd6a559f95c3596ec1ac28b74838c1 | [log] [tgz] |
---|---|---|
author | Paolo Bonzini <pbonzini@redhat.com> | Tue Aug 11 11:33:24 2015 +0200 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Wed Sep 09 15:34:56 2015 +0200 |
tree | cecbe1ad9b5c5593e85b6ced7498f5d88f5078ad | |
parent | 8fd19e6cfd5b6cdf028c6ac2ff4157ed831ea3a6 [diff] |
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>