[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mod
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation |
Date: |
Fri, 28 Aug 2015 16:59:41 +0100 |
On 12 August 2015 at 17:41, Paolo Bonzini <address@hidden> 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, not
> in tb_link_page.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Dropping the outer lock and continuing to hold the inner
one looks rather weird, but I think this is all OK.
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available, (continued)
- [Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Frederic Konrad, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Frederic Konrad, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Peter Maydell, 2015/08/13
- Re: [Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held, Paolo Bonzini, 2015/08/13
[Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation, Paolo Bonzini, 2015/08/12
- Re: [Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation,
Peter Maydell <=
[Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock., Paolo Bonzini, 2015/08/12
Re: [Qemu-devel] [PATCH 00/10] translate-all.c thread-safety, Frederic Konrad, 2015/08/14