x86/HAP: avoid using bogus/misleading locking
authorJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:38:02 +0000 (10:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:38:02 +0000 (10:38 +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>
xen/arch/x86/mm/hap/hap.c

index 872e2a9cb19321aab7d18a057c13345d7925a495..cdc77a95c4f6e6921f98b38b595af499f997636f 100644 (file)
@@ -573,8 +573,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) )
     {