[PATCH] net/mlx5: fix crash when using meter in transfer flow
Khadem Ullah
14pwcse1224 at uetpeshawar.edu.pk
Mon Jul 21 13:38:12 CEST 2025
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.
More information about the dev
mailing list