]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: Take irqfds.lock when adding/deleting IRQ bypass producer
authorSean Christopherson <seanjc@google.com>
Fri, 4 Apr 2025 19:38:19 +0000 (12:38 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Apr 2025 13:52:31 +0000 (09:52 -0400)
commitf1fb088d9cecde5c3066d8ff8846789667519b7d
tree615e489a375b48dba29049161dcb87049694244e
parentbcda70c56f3e718465cab2aad260cf34183ce1ce
KVM: x86: Take irqfds.lock when adding/deleting IRQ bypass producer

Take irqfds.lock when adding/deleting an IRQ bypass producer to ensure
irqfd->producer isn't modified while kvm_irq_routing_update() is running.
The only lock held when a producer is added/removed is irqbypass's mutex.

Fixes: 872768800652 ("KVM: x86: select IRQ_BYPASS_MANAGER")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20250404193923.1413163-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c