kvm: destroy workqueue on kvm_create_pit() failures
PATCH 1/1 kvm: destroy workqueue on kvm_create_pit() failures
kernel needs to destroy workqueue if kvm_create_pit() fails, otherwise after pit is freed, the workqueue is leaked.
Signed-off-by Xiaotian Feng <[email protected]>
Cc Avi Kivity <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Gleb Natapov <[email protected]>
Cc "Michael S. Tsirkin" <[email protected]>
Cc Gregory Haskins <[email protected]>
--- arch/x86/kvm/i8254.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/i8254.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.2.1
Avi Kivity
AppliedQuoted 2 lines · Xiaotian Feng
kernel needs to destroy workqueue if
kvm_create_pit()fails, otherwise after pit is freed, the workqueue is leaked.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function