[PATCH] pci: add O_CLOEXEC when open uio device
Stephen Hemminger
stephen at networkplumber.org
Thu Oct 3 21:08:16 CEST 2024
On Thu, 25 May 2023 11:00:35 +0800
Weifeng Su <suweifeng1 at huawei.com> wrote:
> In this scenario, the DPDK process invokes a script which
> inherits an open file descriptor (FD) for a UIO device.
> After the script execution is complete, the UIO device's
> close operation is called. However, in a new kernel version
> (865a11f987ab5f03:uio/uio_pci_generic: Disable bus-mastering on release),
> this close operation causes the PCI bus master bit to be cleared,
> rendering the device unusable and leading to unexpected behavior.
> This modification was made to prevent the UIO device's FD
> from being inherited by the child process.
> Cc: stable at dpdk.org
>
> Signed-off-by: Weifeng Su <suweifeng1 at huawei.com>
Makes sense that UIO fd's would be marked close on exec.
But should the interrupt fd, and all the other fd's which EAL leaves.
DPDK internal code doesn't invoke scripts. If your application is
going to do so then it needs to lots more cleanup. Probably some
variant of closing all fd's.
More information about the dev
mailing list