[PATCH v4 4/8] eal/linux: fix eventfd leaks when enabling interrupts

David Marchand david.marchand at redhat.com
Fri Oct 23 16:37:30 CEST 2026


On Fri, 23 Oct 2026 at 15:52, Anatoly Burakov <anatoly.burakov at intel.com> wrote:
>
> When enabling MSI-X eventfds, a failure after creating some descriptors
> leaves them open. The eventfd count is recorded only after all allocations
> succeed, so disabling eventfds cannot clean up a partial allocation.
>
> Calling enable again without disabling first also leaks descriptors by
> overwriting the existing eventfd entries.
>
> Reject repeated MSI-X enable calls with EBUSY before modifying the handle.
> Update the eventfd count as each descriptor is created, so that on failure
> every eventfd created by the call can be closed, its entry cleared, and the
> count reset.
>
> Fixes: b9e0662a931d ("eal/linux: add interrupt API for drivers")
> Cc: stable at dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>

There is a type change between the two loops, but that's harmless.

Acked-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the dev mailing list