From: Paolo Bonzini Date: Wed, 26 Apr 2017 14:56:26 +0000 (+0200) Subject: kvm: async_pf: fix rcu_irq_enter() with irqs enabled X-Git-Tag: archive/raspbian/4.9.30-2+deb9u2+rpi1~4^2~554 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1874817aeba15843fd7bb46142f280b6a59b6f82;p=linux-4.9.git 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 Signed-off-by: Paolo Bonzini Acked-by: Paul E. McKenney Tested-by: Wanpeng Li Signed-off-by: Radim Krčmář Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index edbbfc854e39..9cf697ceedbf 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -162,8 +162,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)