From: Stephen Hemminger <stephen@networkplumber.org>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>
Cc: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>,
Thomas Monjalon <thomas@monjalon.net>,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, <dev@dpdk.org>,
<rasland@nvidia.com>, <stable@dpdk.org>,
"Viacheslav Ovsiienko" <viacheslavo@nvidia.com>,
Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Subject: Re: [PATCH] net/mlx5: fix crash when secondary queries dev info after primary exits
Date: Mon, 21 Jul 2025 07:50:28 -0700 [thread overview]
Message-ID: <20250721075028.77fddec0@hermes.local> (raw)
In-Reply-To: <20250721105819.2ci66fl7bzikwb22@ds-vm-debian.local>
On Mon, 21 Jul 2025 12:58:19 +0200
Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:
> I don't think it's an issue on PMD level, but rather on
> ethdev/multi-process handling level.
>
> When primary process closes the port, ethdev library zeroes and frees
> device data shared between processes.
> ethdev port data (rte_eth_dev) on secondary is not updated so it now points to
> invalid data. rte_eth_dev_info_get() is not the only API call affected.
>
> If the primary process closes the port before exiting
> (like testpmd does) and it exits before the secondary,
> the any driver call seems invalid because of that use-after-free behavior.
>
> @Thomas, @Andrew - Do you happen to know if doing anything on ethdev ports
> in secondary process after primary has gracefully exited is supported?
No this is not supported.
A properly written secondary process monitors to see when primary exits.
There are many other parts of DPDK that assume primary is always available.
next prev parent reply other threads:[~2025-07-21 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 7:38 [PATCH] net/mlx5: fix crash when secondary queries dev info after primary exits Khadem Ullah
2025-07-21 10:58 ` Dariusz Sosnowski
2025-07-21 11:38 ` [PATCH] net/mlx5: fix crash when using meter in transfer flow Khadem Ullah
2025-07-21 11:46 ` [PATCH] net/mlx5: fix crash when secondary queries dev info after primary exits Ivan Malov
2025-07-21 11:59 ` Thomas Monjalon
2025-07-21 14:01 ` Dariusz Sosnowski
2025-07-22 12:14 ` [PATCH] ethdev: add dev_private check for secondary process Khadem Ullah
2025-07-22 16:26 ` [PATCH] net/mlx5: fix crash when secondary queries dev info after primary exits Ivan Malov
2025-07-22 16:52 ` Khadem Ullah
2025-07-22 19:30 ` Khadem Ullah
2025-07-23 11:29 ` Khadem Ullah
2025-07-21 14:50 ` Stephen Hemminger [this message]
2025-07-23 14:19 ` Stephen Hemminger
2025-07-29 21:46 ` Stephen Hemminger
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=20250721075028.77fddec0@hermes.local \
--to=stephen@networkplumber.org \
--cc=14pwcse1224@uetpeshawar.edu.pk \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=thomas@monjalon.net \
--cc=viacheslavo@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.