diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2017-04-26 10:56:26 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-06-06 08:43:16 -0400 |
commit | bbaf0e2b1c1b4f88abd6ef49576f0efb1734eae5 (patch) | |
tree | 99fe3f8e3ff76c4837987b5c3d49c26a1b59a697 | |
parent | 3c2993b8c6143d8a5793746a54eba8f86f95240f (diff) |
kvm: async_pf: fix rcu_irq_enter() with irqs enabled
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>
Cc: stable@vger.kernel.org
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>
-rw-r--r-- | arch/x86/kernel/kvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index da5c09789984..43e10d6fdbed 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) | |||
161 | */ | 161 | */ |
162 | rcu_irq_exit(); | 162 | rcu_irq_exit(); |
163 | native_safe_halt(); | 163 | native_safe_halt(); |
164 | rcu_irq_enter(); | ||
165 | local_irq_disable(); | 164 | local_irq_disable(); |
165 | rcu_irq_enter(); | ||
166 | } | 166 | } |
167 | } | 167 | } |
168 | if (!n.halted) | 168 | if (!n.halted) |