From: Carsten Otte Date: Wed, 21 May 2008 11:37:44 +0000 (+0200) Subject: KVM: s390: Fix race condition in kvm_s390_handle_wait X-Git-Tag: v2.6.26-rc6~11^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e52b2af541bcb299212a63cfa3e3231618a415be;p=pandora-kernel.git 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 Signed-off-by: Avi Kivity --- Reading git-diff-tree failed