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

Stephen Hemminger stephen at networkplumber.org
Tue Jul 29 23:46:11 CEST 2025


On Mon, 21 Jul 2025 03:38:51 -0400
Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk> wrote:

> When the primary process exits, the shared mlx5 state becomes
> unavailable to secondary processes. If a secondary process attempts
> to query device information (e.g., via testpmd), a NULL dereference
> may occur due to missing shared data.
> 
> This patch adds a check for shared context availability and fails
> gracefully while preventing a crash.
> 
> Fixes: e60fbd5b24fc ("mlx5: add device configure/start/stop")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk>
> ---

NAK
As per other thread. Drivers need not worry about this.
If secondary gets to this point it is using freed bus and device information
and nothing is valid.


More information about the stable mailing list