* [PATCH] xen/arm: p2m: Add an ASSERT to check that p2m lock is taken in __p2m_lookup
@ 2015-04-27 14:58 Julien Grall
2015-05-05 12:27 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: Julien Grall @ 2015-04-27 14:58 UTC (permalink / raw)
To: xen-devel; +Cc: Julien Grall, stefano.stabellini, tim, ian.campbell
__p2m_lookup should be called with the p2m lock taken. Add an ASSERT in
order to catch wrong caller in debug build.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
xen/arch/arm/p2m.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 8dfee24..65efa94 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -160,6 +160,7 @@ static paddr_t __p2m_lookup(struct domain *d, paddr_t paddr, p2m_type_t *t)
p2m_type_t _t;
unsigned int level, root_table;
+ ASSERT(spin_is_locked(&p2m->lock));
BUILD_BUG_ON(THIRD_MASK != PAGE_MASK);
/* Allow t to be NULL */
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen/arm: p2m: Add an ASSERT to check that p2m lock is taken in __p2m_lookup
2015-04-27 14:58 [PATCH] xen/arm: p2m: Add an ASSERT to check that p2m lock is taken in __p2m_lookup Julien Grall
@ 2015-05-05 12:27 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-05-05 12:27 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, tim, stefano.stabellini
On Mon, 2015-04-27 at 15:58 +0100, Julien Grall wrote:
> __p2m_lookup should be called with the p2m lock taken. Add an ASSERT in
> order to catch wrong caller in debug build.
>
> Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked + applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-05 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 14:58 [PATCH] xen/arm: p2m: Add an ASSERT to check that p2m lock is taken in __p2m_lookup Julien Grall
2015-05-05 12:27 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.