]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86/mm: replace bogus assertion in paging_log_dirty_op()
authorJan Beulich <jbeulich@suse.com>
Tue, 23 May 2023 12:53:39 +0000 (14:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 23 May 2023 12:53:39 +0000 (14:53 +0200)
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 <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: 0956aa2219745a198bb6a0a99e2108a3c09b280e
master date: 2023-05-03 13:38:30 +0200

xen/arch/x86/mm/paging.c

index 308d44bce795e4452878ab5a70a3386dec41690d..ae0340570d7dd8f0b5fc3549c2b1a3ad8709f0e4 100644 (file)
@@ -443,8 +443,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;
     }