From: Jan Beulich Date: Tue, 13 Jun 2017 08:38:02 +0000 (+0200) Subject: x86/HAP: avoid using bogus/misleading locking X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2053 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c9ec0d34e462151d39e0e901b50501db4f6ae78d;p=xen.git 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 --- 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) ) {