Skip to contentSkip to conversation

xen/arm: p2m: Fix hypercall preemption when domain is relinquish memory mapping

PATCH In review Julien Grall 2 participants 2 messages Dec 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: p2m: Fix hypercall preemption when domain is relinquish memory mapping

The commit 84f29a9 "xen/arm: Add relinquish_p2m_mapping to remove reference on every mapped page" doesn't save correctly the next gfn when the hypercall is preempted.

Instead of storing the next gfn, it store the next mfn. Fix it by using 'addr' instead of 'maddr'.

---
 xen/arch/arm/p2m.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/p2m.c +1 -1
index 3f4ab37..d24a6fc 100644
@@ -366,7 +366,7 @@ static int create_p2m_entries(struct domain *d,
         {
             if ( hypercall_preempt_check() )
             {
-                p2m->next_gfn_to_relinquish = maddr >> PAGE_SHIFT;
+                p2m->next_gfn_to_relinquish = addr >> PAGE_SHIFT;
                 rc = -EAGAIN;
                 goto out;
             }
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 8 lines · Julien Grall

The commit 84f29a9 "xen/arm: Add relinquish_p2m_mapping to remove reference on every mapped page" doesn't save correctly the next gfn when the hypercall is preempted.

Instead of storing the next gfn, it store the next mfn. Fix it by using 'addr' instead of 'maddr'.

Acked + applied. Thanks for the speedy fix.