Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -119,8 +119,12 @@ irqfd_shutdown(struct work_struct *work)
|
||||
{
|
||||
struct kvm_kernel_irqfd *irqfd =
|
||||
container_of(work, struct kvm_kernel_irqfd, shutdown);
|
||||
struct kvm *kvm = irqfd->kvm;
|
||||
u64 cnt;
|
||||
|
||||
/* Make sure irqfd has been initalized in assign path. */
|
||||
synchronize_srcu(&kvm->irq_srcu);
|
||||
|
||||
/*
|
||||
* Synchronize with the wait-queue and unhook ourselves to prevent
|
||||
* further events.
|
||||
@@ -387,7 +391,6 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||
|
||||
idx = srcu_read_lock(&kvm->irq_srcu);
|
||||
irqfd_update(kvm, irqfd);
|
||||
srcu_read_unlock(&kvm->irq_srcu, idx);
|
||||
|
||||
list_add_tail(&irqfd->list, &kvm->irqfds.items);
|
||||
|
||||
@@ -402,11 +405,6 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||
if (events & EPOLLIN)
|
||||
schedule_work(&irqfd->inject);
|
||||
|
||||
/*
|
||||
* do not drop the file until the irqfd is fully initialized, otherwise
|
||||
* we might race against the EPOLLHUP
|
||||
*/
|
||||
fdput(f);
|
||||
#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
|
||||
if (kvm_arch_has_irq_bypass()) {
|
||||
irqfd->consumer.token = (void *)irqfd->eventfd;
|
||||
@@ -421,6 +419,13 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
|
||||
}
|
||||
#endif
|
||||
|
||||
srcu_read_unlock(&kvm->irq_srcu, idx);
|
||||
|
||||
/*
|
||||
* do not drop the file until the irqfd is fully initialized, otherwise
|
||||
* we might race against the EPOLLHUP
|
||||
*/
|
||||
fdput(f);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
مرجع در شماره جدید
Block a user