diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2008-05-08 19:47:01 -0300 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-05-18 14:37:12 +0300 |
commit | e5c239cfd5b0ec22751c099dbf4d91f3c504a64f (patch) | |
tree | d0a63882f0592a4ce23a98478fb9c935213b2e16 /MAINTAINERS | |
parent | bd25ed033af52c8c054d43a9cce9c5976266ae74 (diff) |
KVM: Fix kvm_vcpu_block() task state race
There's still a race in kvm_vcpu_block(), if a wake_up_interruptible()
call happens before the task state is set to TASK_INTERRUPTIBLE:
CPU0 CPU1
kvm_vcpu_block
add_wait_queue
kvm_cpu_has_interrupt = 0
set interrupt
if (waitqueue_active())
wake_up_interruptible()
kvm_cpu_has_pending_timer
kvm_arch_vcpu_runnable
signal_pending
set_current_state(TASK_INTERRUPTIBLE)
schedule()
Can be fixed by using prepare_to_wait() which sets the task state before
testing for the wait condition.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions