Re: [PATCH v2] KVM: x86: Take PIC lock on KVM_GET_IRQCHIP path

From: Sean Christopherson

Date: Fri Jun 05 2026 - 14:32:58 EST


On Fri, 29 May 2026 16:00:14 +0200, Carlos López wrote:
> When userspace issues the KVM_SET_IRQCHIP ioctl to set the state of
> the PIC, kvm_vm_ioctl_set_irqchip() grabs @kvm->arch.vpic->lock before
> updating the state. However, the KVM_GET_IRQCHIP ioctl to retrieve the
> same PIC state does not grab such lock, potentially causing torn reads
> for userspace.
>
> Fix this by grabbing the lock on the read path.
>
> [...]

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: Take PIC lock on KVM_GET_IRQCHIP path
https://github.com/kvm-x86/linux/commit/376e11855154

--
https://github.com/kvm-x86/linux/tree/next