All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: destroy workqueue on kvm_create_pit() failures
@ 2010-08-13  8:23 Xiaotian Feng
  2010-08-15 11:18 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Xiaotian Feng @ 2010-08-13  8:23 UTC (permalink / raw)
  To: kvm, x86
  Cc: linux-kernel, Xiaotian Feng, Avi Kivity, Marcelo Tosatti,
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Gleb Natapov,
	Michael S. Tsirkin, Gregory Haskins

kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise
after pit is freed, the workqueue is leaked.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gregory Haskins <ghaskins@novell.com>
---
 arch/x86/kvm/i8254.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 0fd6378..f539c3c 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -742,7 +742,7 @@ fail:
 	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);
-
+	destroy_workqueue(pit->wq);
 	kfree(pit);
 	return NULL;
 }
-- 
1.7.2.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm: destroy workqueue on kvm_create_pit() failures
  2010-08-13  8:23 [PATCH] kvm: destroy workqueue on kvm_create_pit() failures Xiaotian Feng
@ 2010-08-15 11:18 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-08-15 11:18 UTC (permalink / raw)
  To: Xiaotian Feng
  Cc: kvm, x86, linux-kernel, Marcelo Tosatti, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, Gleb Natapov, Michael S. Tsirkin,
	Gregory Haskins

  On 08/13/2010 11:23 AM, Xiaotian Feng wrote:
> kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise
> after pit is freed, the workqueue is leaked.

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-15 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13  8:23 [PATCH] kvm: destroy workqueue on kvm_create_pit() failures Xiaotian Feng
2010-08-15 11:18 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.