diff options
| author | Sean Christopherson <[email protected]> | 2024-02-09 22:20:46 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2024-02-23 00:24:09 +0000 |
| commit | a78d9046696b88079a5696bccec4e4e439a3f2a2 (patch) | |
| tree | e97fcb2825dacf56674e1b9024632e1ef6fc0857 /drivers/usb/cdns3/cdns3-trace.c | |
| parent | KVM: x86: Fully defer to vendor code to decide how to force immediate exit (diff) | |
| download | kernel-a78d9046696b88079a5696bccec4e4e439a3f2a2.tar.gz kernel-a78d9046696b88079a5696bccec4e4e439a3f2a2.zip | |
KVM: x86: Move "KVM no-APIC vCPU" key management into local APIC code
Move incrementing and decrementing of kvm_has_noapic_vcpu into
kvm_create_lapic() and kvm_free_lapic() respectively to fix a benign bug
where KVM fails to decrement the count if vCPU creation ultimately fails,
e.g. due to a memory allocation failing.
Note, the bug is benign as kvm_has_noapic_vcpu is used purely to optimize
lapic_in_kernel() checks, and that optimization is quite dubious. That,
and practically speaking no setup that cares at all about performance runs
with a userspace local APIC.
Reported-by: Li RongQing <[email protected]>
Cc: Maxim Levitsky <[email protected]>
Reviewed-by: Xu Yilun <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions
