]> xenbits.xensource.com Git - xen.git/commitdiff
x86/HAP: avoid using bogus/misleading locking
authorJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:46:13 +0000 (10:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:46:13 +0000 (10:46 +0200)
hap_teardown() unconditionally releases the paging lock and is always
being called without the lock held: Lock acquire should then be
unconditional too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
master commit: c9ec0d34e462151d39e0e901b50501db4f6ae78d
master date: 2017-06-13 10:38:02 +0200

xen/arch/x86/mm/hap/hap.c

index 8476269c1475c90d4eb4604f557a23324afb44ab..77c741286590f0321d4315e007c2a986a912a7b1 100644 (file)
@@ -576,8 +576,7 @@ void hap_teardown(struct domain *d, bool *preempted)
     ASSERT(d->is_dying);
     ASSERT(d != current->domain);
 
-    if ( !paging_locked_by_me(d) )
-        paging_lock(d); /* Keep various asserts happy */
+    paging_lock(d); /* Keep various asserts happy */
 
     if ( paging_mode_enabled(d) )
     {