kvm: async_pf: fix rcu_irq_enter() with irqs enabled
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Apr 2017 14:56:26 +0000 (16:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 11:16:21 +0000 (13:16 +0200)
commita8bbdf1921fde7643eb22b508acc2fa0239021bf
treefa201929ca28f3cb2c52d7265061471c14557453
parente21ad4a956d4c70cea2a5086b9617bc8ddc8535a
kvm: async_pf: fix rcu_irq_enter() with irqs enabled

commit bbaf0e2b1c1b4f88abd6ef49576f0efb1734eae5 upstream.

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 <ross.zwisler@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/kvm.c