diff mbox

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

Message ID 1387385648-27618-1-git-send-email-julien.grall@linaro.org
State Accepted, archived
Headers show

Commit Message

Julien Grall Dec. 18, 2013, 4:54 p.m. UTC
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'.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/p2m.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ian Campbell Dec. 18, 2013, 4:58 p.m. UTC | #1
On Wed, 2013-12-18 at 16:54 +0000, Julien Grall wrote:
> 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'.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Acked + applied. Thanks for the speedy fix.
diff mbox

Patch

diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index 3f4ab37..d24a6fc 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -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;
             }