Re: KVM: x86: question about kvm_ioapic_destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 27 Apr 2015, Michael S. Tsirkin wrote:

> On Sun, Apr 26, 2015 at 07:19:58PM +0200, Julia Lawall wrote:
> > 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
>
> I think the NULL test is not needed.
> kvm_ioapic_destroy is only called if kvm_ioapic_init
> completed successfully, and that sets kvm->arch.vioapic.

Thanks.  I will send a patch.

julia
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux