[PATCH] net/mlx5: fix crash when secondary queries dev info after primary exits

Stephen Hemminger stephen at networkplumber.org
Mon Jul 21 16:50:28 CEST 2025


On Mon, 21 Jul 2025 12:58:19 +0200
Dariusz Sosnowski <dsosnowski at 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.


More information about the dev mailing list