From c9ec0d34e462151d39e0e901b50501db4f6ae78d Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 13 Jun 2017 10:38:02 +0200 Subject: [PATCH] x86/HAP: avoid using bogus/misleading locking 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 Reviewed-by: Andrew Cooper --- xen/arch/x86/mm/hap/hap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c index 872e2a9cb1..cdc77a95c4 100644 --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -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) ) { -- 2.30.2