Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S638346AbdDZO4l (ORCPT ); Wed, 26 Apr 2017 10:56:41 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36773 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1955953AbdDZO4c (ORCPT ); Wed, 26 Apr 2017 10:56:32 -0400 From: Paolo Bonzini To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: rkrcmar@redhat.com, ross.zwisler@linux.intel.com, paulmck@linux.vnet.ibm.com, jack@suse.cz, linux-ext4@vger.kernel.org, tytso@mit.edu, josh@joshtriplett.org, stable@vger.kernel.org Subject: [PATCH] kvm: async_pf: fix rcu_irq_enter() with irqs enabled Date: Wed, 26 Apr 2017 16:56:26 +0200 Message-Id: <20170426145626.6407-1-pbonzini@redhat.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 776 Lines: 28 native_safe_halt enables interrupts, and you just shouldn't call rcu_irq_enter() with interrupts enabled. Reorder the call with the following local_irq_disable() to respect the invariant. Reported-by: Ross Zwisler Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini --- arch/x86/kernel/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 14f65a5f938e..2a7835932b71 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -161,8 +161,8 @@ void kvm_async_pf_task_wait(u32 token) */ rcu_irq_exit(); native_safe_halt(); - rcu_irq_enter(); local_irq_disable(); + rcu_irq_enter(); } } if (!n.halted) -- 2.9.3