[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] arm: fix locking in create_p2m_entries
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1340724238 -3600 # Node ID b91ef972029ddaa110af6463171715ab9070c9d8 # Parent 21c75c5ac5f4aa39778843bae21334dde2a4d5db arm: fix locking in create_p2m_entries For some reason we were holding the lock over only the unmaps at the end of the function, rather than for the whole walk. We might want to be more clever in the future, but for now lets just lock for the whole walk+create process. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 21c75c5ac5f4 -r b91ef972029d xen/arch/arm/p2m.c --- a/xen/arch/arm/p2m.c Tue Jun 26 16:23:58 2012 +0100 +++ b/xen/arch/arm/p2m.c Tue Jun 26 16:23:58 2012 +0100 @@ -130,6 +130,8 @@ static int create_p2m_entries(struct dom paddr_t addr; unsigned long cur_first_offset = ~0, cur_second_offset = ~0; + spin_lock(&p2m->lock); + /* XXX Don't actually handle 40 bit guest physical addresses */ BUG_ON(start_gpaddr & 0x8000000000ULL); BUG_ON(end_gpaddr & 0x8000000000ULL); @@ -211,8 +213,6 @@ static int create_p2m_entries(struct dom rc = 0; out: - spin_lock(&p2m->lock); - if (third) unmap_domain_page(third); if (second) unmap_domain_page(second); if (first) unmap_domain_page(first); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |