Re: [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation

2015-08-28 Thread Peter Maydell
On 12 August 2015 at 17:41, Paolo Bonzini wrote: > 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,

[Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation

2015-08-12 Thread Paolo Bonzini
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. Signed-off-by: Paolo Bonzini --- cpu-