KVM: Properly lock PIT creation
authorAvi Kivity <avi@redhat.com>
Mon, 5 Jan 2009 13:21:42 +0000 (15:21 +0200)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:03:01 +0000 (11:03 +0200)
commit269e05e48502f1cc06802e9fba90f5100dd6bb0d
tree9b3501dc1f5e137c2dca7eacf15c0353f627be97
parenta77ab5ead5c1fef2c6c5a9b3cf3765e52643a2aa
KVM: Properly lock PIT creation

Otherwise, two threads can create a PIT in parallel and cause a memory leak.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/i8254.c
arch/x86/kvm/x86.c