From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: kvm@vger.kernel.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Subject: [PATCH 3/4] KVM: PIT: unregister kvm irq notifier if fail to create pit
Date: Tue, 09 Feb 2010 10:39:27 +0800 [thread overview]
Message-ID: <4B70CADF.7070204@cn.fujitsu.com> (raw)
In-Reply-To: <4B70C95F.7070508@cn.fujitsu.com>
If fail to create pit, we should unregister kvm irq notifier
which register in kvm_create_pit().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
---
arch/x86/kvm/i8254.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 6a74246..c9569f2 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -663,8 +663,9 @@ fail_unregister:
kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &pit->dev);
fail:
- if (pit->irq_source_id >= 0)
- kvm_free_irq_source_id(kvm, pit->irq_source_id);
+ kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier);
+ kvm_unregister_irq_ack_notifier(kvm, &pit_state->irq_ack_notifier);
+ kvm_free_irq_source_id(kvm, pit->irq_source_id);
kfree(pit);
return NULL;
--
1.6.3.3
next prev parent reply other threads:[~2010-02-09 2:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 2:31 [PATCH 1/4] KVM: kvm->arch.vioapic should be NULL if kvm_ioapic_init() failure Wei Yongjun
2010-02-09 2:33 ` [PATCH 2/4] KVM: cleanup the failure path of KVM_CREATE_IRQCHIP ioctrl Wei Yongjun
2010-02-09 2:39 ` Wei Yongjun [this message]
2010-02-09 2:41 ` [PATCH 4/4] KVM: ia64: destroy ioapic device if fail to setup default irq routing Wei Yongjun
2010-02-09 10:46 ` [PATCH 1/4] KVM: kvm->arch.vioapic should be NULL if kvm_ioapic_init() failure Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B70CADF.7070204@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox