You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/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
This commit is contained in:
+2
-1
@@ -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
|
||||||
|
|||||||
+3
-1
@@ -1970,10 +1970,12 @@ static int kvm_cpu_hotplug(struct notifier_block *notifier, unsigned long val,
|
|||||||
|
|
||||||
asmlinkage void kvm_handle_fault_on_reboot(void)
|
asmlinkage void kvm_handle_fault_on_reboot(void)
|
||||||
{
|
{
|
||||||
if (kvm_rebooting)
|
if (kvm_rebooting) {
|
||||||
/* spin while reset goes on */
|
/* spin while reset goes on */
|
||||||
|
local_irq_enable();
|
||||||
while (true)
|
while (true)
|
||||||
;
|
;
|
||||||
|
}
|
||||||
/* Fault while not rebooting. We want the trace. */
|
/* Fault while not rebooting. We want the trace. */
|
||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user