public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* KVM: x86: question about kvm_ioapic_destroy
@ 2015-04-26 17:19 Julia Lawall
  2015-04-27 10:05 ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2015-04-26 17:19 UTC (permalink / raw)
  To: zhanghy, mst, jasowang, zhanghy, pbonzini, x86, kvm, linux-kernel

The function kvm_ioapic_destroy is defined as follows:

void kvm_ioapic_destroy(struct kvm *kvm)
{
        struct kvm_ioapic *ioapic = kvm->arch.vioapic;

        cancel_delayed_work_sync(&ioapic->eoi_inject);
        if (ioapic) {
                kvm_io_bus_unregister_dev(kvm, KVM_MMIO_BUS, &ioapic->dev);
                kvm->arch.vioapic = NULL;
                kfree(ioapic);
        }
}

Is there any way that cancel_delayed_work_sync can work if ioapic is NULL?  
Should the call be moved down under the NULL test?  Or is the NULL test 
not needed?  The NULL test has been there longer than the call to 
cancel_delayed_work_sync, which was introduced in 184564ef.

thanks,
julia

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

end of thread, other threads:[~2015-04-27 12:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-26 17:19 KVM: x86: question about kvm_ioapic_destroy Julia Lawall
2015-04-27 10:05 ` Michael S. Tsirkin
2015-04-27 12:13   ` Paolo Bonzini
2015-04-27 12:32   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox