commit | 4c0b4bc60f95de4741c89b41174760258343f091 | [log] [tgz] |
---|---|---|
author | Davidlohr Bueso <dave@stgolabs.net> | Wed Sep 13 13:08:24 2017 -0700 |
committer | Paolo Bonzini <pbonzini@redhat.com> | Fri Sep 15 16:57:13 2017 +0200 |
tree | 60a9e39653ad9d755c962633f8ea63c4b88f76f1 | |
parent | 267ad7bc2d3f69af536035b6a3e4a9a2b6ae11dc [diff] |
kvm,mips: Fix potential swait_active() races For example, the following could occur, making us miss a wakeup: CPU0 CPU1 kvm_vcpu_block kvm_mips_comparecount_func [L] swait_active(&vcpu->wq) [S] prepare_to_swait(&vcpu->wq) [L] if (!kvm_vcpu_has_pending_timer(vcpu)) schedule() [S] queue_timer_int(vcpu) Ensure that the swait_active() check is not hoisted over the interrupt. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>