From: Stephen Hemminger <stephen@networkplumber.org>
To: Weifeng Su <suweifeng1@huawei.com>
Cc: <dev@dpdk.org>, <linfeilong@huawei.com>, <stable@dpdk.org>
Subject: Re: [PATCH] pci: add O_CLOEXEC when open uio device
Date: Thu, 3 Oct 2024 12:08:16 -0700 [thread overview]
Message-ID: <20241003120816.0192c7d7@hermes.local> (raw)
In-Reply-To: <20230525030035.33872-1-suweifeng1@huawei.com>
On Thu, 25 May 2023 11:00:35 +0800
Weifeng Su <suweifeng1@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@dpdk.org
>
> Signed-off-by: Weifeng Su <suweifeng1@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.
prev parent reply other threads:[~2024-10-03 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 3:00 Weifeng Su
2024-10-03 19:08 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241003120816.0192c7d7@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=linfeilong@huawei.com \
--cc=stable@dpdk.org \
--cc=suweifeng1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).