From: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
To: dsosnowski@nvidia.com, thomas@monjalon.net,
andrew.rybchenko@oktetlabs.ru
Cc: dev@dpdk.org, rasland@nvidia.com, stable@dpdk.org,
viacheslavo@nvidia.com, orika@nvidia.com, suanmingm@nvidia.com,
matan@nvidia.com
Subject: Re: [PATCH] net/mlx5: fix crash when using meter in transfer flow
Date: Mon, 21 Jul 2025 07:38:12 -0400 [thread overview]
Message-ID: <20250721113822.1029342-1-14pwcse1224@uetpeshawar.edu.pk> (raw)
In-Reply-To: <20250721105819.2ci66fl7bzikwb22@ds-vm-debian.local>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 820 bytes --]
Hi Dariusz,
Thanks for the feedback. Agreed, this check only papers over a deeper issue with
multi-process lifecycle in ethdev.
If the primary process exits after freeing ethdev data, all subsequent PMD-level
calls (e.g., dev_infos_get) in secondary are inherently unsafe due to dangling
pointers.
Unless ethdev explicitly invalidates the port (or secondary process detects
primary exit), the current behavior results in use-after-free regardless of PMD.
For now, this patch avoids a crash in one case (dev_infos_get), but long-term
a proper ethdev-level solution is needed — either by:
- Marking ports invalid on primary exit,
- Notifying secondaries to teardown,
- Or refusing API access after shared data disappears.
Until then, we can keep this as a safety patch to prevent segfaults in common test scenarios.
next prev parent reply other threads:[~2025-07-21 11:39 UTC|newest]
Thread overview: 12+ 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 ` Khadem Ullah [this message]
2025-07-21 11:46 ` Ivan Malov
2025-07-21 11:59 ` Thomas Monjalon
2025-07-21 14:01 ` Dariusz Sosnowski
2025-07-21 14:50 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2025-07-02 12:36 [PATCH] net/mlx5: fix crash when using meter in transfer flow Khadem Ullah
2025-07-15 17:39 ` Dariusz Sosnowski
2025-07-15 17:51 ` Dariusz Sosnowski
2025-07-16 7:23 ` Khadem Ullah
2025-07-16 10:55 ` Dariusz Sosnowski
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=20250721113822.1029342-1-14pwcse1224@uetpeshawar.edu.pk \
--to=14pwcse1224@uetpeshawar.edu.pk \
--cc=andrew.rybchenko@oktetlabs.ru \
--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 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).