Skip to content

Commit

Permalink
Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/vir…
Browse files Browse the repository at this point in the history
…t/kvm/kvm

* 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: Fix reboot on Intel hosts
  KVM: fix irqfd assign/deassign race
  • Loading branch information
Linus Torvalds committed Sep 24, 2010
2 parents 91e71c1 + ca242ac commit bcf835e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion virt/kvm/eventfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
events = file->f_op->poll(file, &irqfd->pt);

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
Expand All @@ -227,6 +226,8 @@ kvm_irqfd_assign(struct kvm *kvm, int fd, int gsi)
if (events & POLLIN)
schedule_work(&irqfd->inject);

spin_unlock_irq(&kvm->irqfds.lock);

/*
* do not drop the file until the irqfd is fully initialized, otherwise
* we might race against the POLLHUP
Expand Down
4 changes: 3 additions & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1970,10 +1970,12 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,

asmlinkage void kvm_handle_fault_on_reboot(void)
{
if (kvm_rebooting)
if (kvm_rebooting) {
/* spin while reset goes on */
local_irq_enable();
while (true)
;
}
/* Fault while not rebooting. We want the trace. */
BUG();
}
Expand Down

0 comments on commit bcf835e

Please sign in to comment.