From: Dmitry Vyukov Subject: [PATCH] kvm: initialize SVM spinlock Date: Sun, 22 Jan 2017 10:04:53 +0100 Message-ID: <20170122090453.88101-1-dvyukov@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Dmitry Vyukov , kvm@vger.kernel.org, syzkaller@googlegroups.com To: joro@8bytes.org, pbonzini@redhat.com, rkrcmar@redhat.com Return-path: Received: from mail-wm0-f51.google.com ([74.125.82.51]:37893 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbdAVJE7 (ORCPT ); Sun, 22 Jan 2017 04:04:59 -0500 Received: by mail-wm0-f51.google.com with SMTP id r144so108744461wme.1 for ; Sun, 22 Jan 2017 01:04:58 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: Currently svm_vm_data_hash_lock is left uninitialized. This causes lockdep warnings. Properly initialize it. Signed-off-by: Dmitry Vyukov Cc: Joerg Roedel Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: kvm@vger.kernel.org Cc: syzkaller@googlegroups.com --- arch/x86/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 08a4d3ab3455..b928a9c34987 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -972,7 +972,7 @@ static void svm_disable_lbrv(struct vcpu_svm *svm) */ #define SVM_VM_DATA_HASH_BITS 8 DECLARE_HASHTABLE(svm_vm_data_hash, SVM_VM_DATA_HASH_BITS); -static spinlock_t svm_vm_data_hash_lock; +static DEFINE_SPINLOCK(svm_vm_data_hash_lock); /* Note: * This function is called from IOMMU driver to notify -- 2.11.0.483.g087da7b7c-goog