Skip to contentSkip to conversation

KVM: PIT: free irq source id in handling error path

PATCH Superseded Xiao Guangrong 2 participants 3 messages Jul 20, 2010 – Aug 17, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PIT: free irq source id in handling error path

Free irq source id if create pit workqueue fail

---
 arch/x86/kvm/i8254.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/i8254.c +1 -0
index 0fd6378..211716f 100644
@@ -697,6 +697,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
 	pit->wq = create_singlethread_workqueue("kvm-pit-wq");
 	if (!pit->wq) {
 		mutex_unlock(&pit->pit_state.lock);
+		kvm_free_irq_source_id(kvm, pit->irq_source_id);
 		kfree(pit);
 		return NULL;
 	}
Signature · 1 line
1.6.1.2
#1 lore raw

PATCH RESEND 1/1 KVM: PIT: free irq source id in handling error path

Free irq source id if create pit workqueue fail

---
 arch/x86/kvm/i8254.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/i8254.c +1 -0
index 0fd6378..211716f 100644
@@ -697,6 +697,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
 	pit->wq = create_singlethread_workqueue("kvm-pit-wq");
 	if (!pit->wq) {
 		mutex_unlock(&pit->pit_state.lock);
+		kvm_free_irq_source_id(kvm, pit->irq_source_id);
 		kfree(pit);
 		return NULL;
 	}
Signature · 1 line
1.6.1.2
Applied
#2 lore raw
Quoted 2 lines · Xiao Guangrong

Free irq source id if create pit workqueue fail

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function