public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
	zhanghy@sangfor.com, jasowang@redhat.com, pbonzini@redhat.com,
	x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: KVM: x86: question about kvm_ioapic_destroy
Date: Mon, 27 Apr 2015 14:32:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1504271432240.2545@hadrien> (raw)
In-Reply-To: <20150427120342-mutt-send-email-mst@redhat.com>



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

      parent reply	other threads:[~2015-04-27 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.10.1504271432240.2545@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=x86@kernel.org \
    --cc=zhanghy@sangfor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox