From: Jan Beulich Date: Wed, 3 May 2023 11:38:30 +0000 (+0200) Subject: x86/mm: replace bogus assertion in paging_log_dirty_op() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0956aa2219745a198bb6a0a99e2108a3c09b280e;p=people%2Froyger%2Fxen.git x86/mm: replace bogus assertion in paging_log_dirty_op() While I was the one to introduce it, I don't think it is correct: A bogus continuation call issued by a tool stack domain may find another continuation in progress. IOW we've been asserting caller controlled state (which is reachable only via a domctl), and the early (lock-less) check in paging_domctl() helps in a limited way only. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index b1d6bfe10e..34d833251b 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -431,8 +431,8 @@ static int paging_log_dirty_op(struct domain *d, d->arch.paging.preempt.op != sc->op ) { paging_unlock(d); - ASSERT(!resuming); - domain_unpause(d); + if ( !resuming ) + domain_unpause(d); return -EBUSY; }