KVM: PIT: Unregister ack notifier callback when freeing
authorGleb Natapov <gleb@redhat.com>
Thu, 16 Jul 2009 14:03:30 +0000 (17:03 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:33:16 +0000 (08:33 +0300)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/i8254.c

index 137e548..472653c 100644 (file)
@@ -672,6 +672,8 @@ void kvm_free_pit(struct kvm *kvm)
        if (kvm->arch.vpit) {
                kvm_unregister_irq_mask_notifier(kvm, 0,
                                               &kvm->arch.vpit->mask_notifier);
+               kvm_unregister_irq_ack_notifier(kvm,
+                               &kvm->arch.vpit->pit_state.irq_ack_notifier);
                mutex_lock(&kvm->arch.vpit->pit_state.lock);
                timer = &kvm->arch.vpit->pit_state.pit_timer.timer;
                hrtimer_cancel(timer);