From: Julien Grall Date: Wed, 18 Dec 2013 16:54:08 +0000 (+0000) Subject: xen/arm: p2m: Fix hypercall preemption when domain is relinquish memory mapping X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5727 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d929ba0cd0e84548f6d35fa77da08663ba4b0d0;p=xen.git 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'. Signed-off-by: Julien Grall Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 3f4ab37915..d24a6fc7b1 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; }