From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: [PATCH for-4.5 v2] x86/hvm: remove stray ioreq_server.lock lock release from hvm_ioreq_server_init() Date: Fri, 26 Sep 2014 15:27:18 +0200 Message-ID: <1411738038-3278-1-git-send-email-vkuznets@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XXVYW-0006uI-HK for xen-devel@lists.xenproject.org; Fri, 26 Sep 2014 13:27:28 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Andrew Jones , Paul Durrant , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org If HVM_PARAM_IOREQ_PFN, HVM_PARAM_BUFIOREQ_PFN, or HVM_PARAM_BUFIOREQ_EVTCHN parameters are read when guest domain is dying it leads to the following ASSERT: (XEN) Assertion '_raw_spin_is_locked(lock)' failed at ...workspace/KERNEL/xen/xen/include/asm/spinlock.h:18 (XEN) ----[ Xen-4.5-unstable x86_64 debug=y Not tainted ]---- ... (XEN) Xen call trace: (XEN) [] _spin_unlock+0x27/0x30 (XEN) [] hvm_create_ioreq_server+0x3df/0x49a (XEN) [] do_hvm_op+0x12bf/0x27a0 (XEN) [] syscall_enter+0xeb/0x145 The root cause of this issue is the fact that ioreq_server.lock is being released twice - first in hvm_ioreq_server_init() and then in hvm_create_ioreq_server(). Drop the lock release from hvm_ioreq_server_init() as we don't take it here. Signed-off-by: Vitaly Kuznetsov --- Changes from v1: - Instead of protecting agains creating ioreq server while guest domain is dying remove stray ioreq_server.lock lock release from hvm_ioreq_server_init(). Rename the patch accordingly. [Paul Durrant] --- xen/arch/x86/hvm/hvm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 0a20cbe..1587858 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -993,7 +993,6 @@ static int hvm_ioreq_server_init(struct hvm_ioreq_server *s, struct domain *d, hvm_ioreq_server_free_rangesets(s, is_default); fail1: - spin_unlock(&d->arch.hvm_domain.ioreq_server.lock); return rc; } -- 1.9.3