Skip to content

Commit

Permalink
kvm: async_pf: fix rcu_irq_enter() with irqs enabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Tested-by: Wanpeng Li <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
  • Loading branch information
bonzini authored and rkrcmar committed Jun 6, 2017
1 parent 3c2993b commit bbaf0e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bbaf0e2

Please sign in to comment.