Skip to content
Commit 956b56a9 authored by Alex Williamson's avatar Alex Williamson
Browse files

vfio/pci: Fix ordering of eventfd vs virqfd shutdown



Both the INTx and MSI/X disable paths do an eventfd_ctx_put() for the
trigger eventfd before calling vfio_virqfd_disable() any potential
mask and unmask eventfds.  This opens a use-after-free race where an
inopportune irqfd can reference the freed signalling eventfd.  Reorder
to avoid this possibility.

Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 1a695a90
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment