summaryrefslogtreecommitdiff
path: root/lib/locking-selftest-rlock.h
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2008-05-21 13:37:44 +0200
committerAvi Kivity <avi@qumranet.com>2008-06-06 21:08:26 +0300
commite52b2af541bcb299212a63cfa3e3231618a415be (patch)
tree745f8d30f645b052cb96909148f4dfe80d952361 /lib/locking-selftest-rlock.h
parent1f0d0f094df9a570dfc26d5eb825986b7e165e1d (diff)
KVM: s390: Fix race condition in kvm_s390_handle_wait
The call to add_timer was issued before local_int.lock was taken and before timer_due was set to 0. If the timer expires before the lock is being taken, the timer function will set timer_due to 1 and exit before the vcpu falls asleep. Depending on other external events, the vcpu might sleep forever. This fix pulls setting timer_due to the beginning of the function before add_timer, which ensures correct behavior. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'lib/locking-selftest-rlock.h')
0 files changed, 0 insertions, 0 deletions