From patchwork Thu Dec 29 21:17:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Luczaj X-Patchwork-Id: 13083834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01415C3DA79 for ; Thu, 29 Dec 2022 21:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234182AbiL2VSK (ORCPT ); Thu, 29 Dec 2022 16:18:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234183AbiL2VSF (ORCPT ); Thu, 29 Dec 2022 16:18:05 -0500 Received: from mailtransmit05.runbox.com (mailtransmit05.runbox.com [IPv6:2a0c:5a00:149::26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBBBBF70 for ; Thu, 29 Dec 2022 13:18:04 -0800 (PST) Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1pB0Hn-001cOQ-6B; Thu, 29 Dec 2022 22:17:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=rbox.co; s=selector1; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From; bh=Cw4Vrb2FZzm+VLmtwHzRrpi9COIilDxPuIqgvfvFxUM=; b=Wp3fa7EDvoPAy4ukNmJJMSTuxB YxUtrKkW+h0Y1WIl07yfCwneuYGMHed22+W73H2r8UI+EfGX4NYVZirtsdOXMkNvdY7FdjhZ0f92J /s4e9UfXqA2GqVz2OwiXM7wchV4DlyQo1JBQaa9bDg7c2BqYY61hcgF27r72jI2tw20pKN+oLr2Ls wo4aYny0i25Wpnt/1H0jZjE+PjmEo9DqTATvIUzdpFFfQYfk+j0rn7o3mMRCQgg7PLcqh/MxSj216 lML8bNnhexP/Z5lU9WgTDH/gMEWQba4lBf81mgGnIlS2i9gkbGeRZvt/TIR1YsLOojP31wSP89g7G tizt7JLw==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1pB0Hm-0001uj-Od; Thu, 29 Dec 2022 22:17:59 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (604044)] (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) id 1pB0Hf-0003k1-E7; Thu, 29 Dec 2022 22:17:51 +0100 From: Michal Luczaj To: pbonzini@redhat.com Cc: dwmw2@infradead.org, kvm@vger.kernel.org, paul@xen.org, seanjc@google.com, Michal Luczaj Subject: [PATCH 0/2] Fix deadlocks in kvm_vm_ioctl_set_msr_filter() and Date: Thu, 29 Dec 2022 22:17:35 +0100 Message-Id: <20221229211737.138861-1-mhal@rbox.co> X-Mailer: git-send-email 2.39.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org I've moved the synchronize_srcu*() after the mutex_unlock(), but wasn't sure about kvm_make_all_cpus_request(), so left it, as it was, under the mutex. Or should it be moved out of critical section just as well? Michal Luczaj (2): KVM: x86: Fix deadlock in kvm_vm_ioctl_set_msr_filter() KVM: x86: Fix deadlock in kvm_vm_ioctl_set_pmu_event_filter() arch/x86/kvm/pmu.c | 2 +- arch/x86/kvm/x86.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-)