On Thursday 29 May 2008 23:39:37 Mark McLoughlin wrote:
> > @@ -184,16 +190,27 @@ out:
> >   static irqreturn_t kvm_pci_pt_dev_intr(int irq, void *dev_id)
> >   {
> >     struct kvm *kvm = (struct kvm *) dev_id;
> > +   struct kvm_pci_pt_dev_list *pci_pt_dev;
> >
> >     if (!test_bit(irq, pt_irq_handled))
> >             return IRQ_NONE;
> >
> > -   kvm->arch.pci_pt_int_work.irq = irq;
> > -   kvm->arch.pci_pt_int_work.kvm = kvm;
> > -   kvm->arch.pci_pt_int_work.source = 0;
> > +   read_lock(&kvm_pci_pt_lock);
> > +   pci_pt_dev = kvm_find_pci_pt_dev(&kvm->arch.pci_pt_dev_head, NULL,
> > +                                    irq, KVM_PT_SOURCE_IRQ);
> > +   if (!pci_pt_dev) {
> > +           read_unlock(&kvm_pci_pt_lock);
> > +           return IRQ_NONE;
> > +   }
> > +
> > +   pci_pt_dev->pt_dev.int_work.irq = irq;
> > +   pci_pt_dev->pt_dev.int_work.kvm = kvm;
> > +   pci_pt_dev->pt_dev.int_work.source = 0;
> >
> >     kvm_get_kvm(kvm);
>
> Won't we leak this reference if we get another interrupt before the
> workqueue is scheduled?

Currently, we disable the interrupt line till the ack is done. We don't 
support shared interrupts yet, so this will work till we have the shared 
interrupt support ready.

Amit.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to