|
@@ -218,7 +218,6 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
|
|
events = file->f_op->poll(file, &irqfd->pt);
|
|
events = file->f_op->poll(file, &irqfd->pt);
|
|
|
|
|
|
list_add_tail(&irqfd->list, &kvm->irqfds.items);
|
|
list_add_tail(&irqfd->list, &kvm->irqfds.items);
|
|
- spin_unlock_irq(&kvm->irqfds.lock);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* Check if there was an event already pending on the eventfd
|
|
* Check if there was an event already pending on the eventfd
|
|
@@ -227,6 +226,8 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
|
|
if (events & POLLIN)
|
|
if (events & POLLIN)
|
|
schedule_work(&irqfd->inject);
|
|
schedule_work(&irqfd->inject);
|
|
|
|
|
|
|
|
+ spin_unlock_irq(&kvm->irqfds.lock);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* do not drop the file until the irqfd is fully initialized, otherwise
|
|
* do not drop the file until the irqfd is fully initialized, otherwise
|
|
* we might race against the POLLHUP
|
|
* we might race against the POLLHUP
|