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 --- While this is only a cosmetic change afaict I would still like to explore whether to include this in 4.9. --- a/xen/arch/x86/mm/hap/hap.c +++ b/xen/arch/x86/mm/hap/hap.c @@ -576,8 +576,7 @@ void hap_teardown(struct domain *d, bool 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) ) {