[PATCH] lib/ethdev: fix segfault in secondary process by validating dev_private pointer
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 22 15:39:24 CEST 2025
On Tue, 22 Jul 2025 07:54:39 -0400
Khadem Ullah <14pwcse1224 at uetpeshawar.edu.pk> wrote:
> + if (rte_eal_process_type() == RTE_PROC_SECONDARY &&
> + (dev == NULL || dev->data == NULL ||
> + dev->data->dev_private == NULL ||
dev can't be NULL and checking it here will cause a Coverity warning.
There are many other ethdev calls that will fail if primary dies.
stats, xstats, rx/tx burst, ...
I don't think it is good idea to add checks here.
More information about the dev
mailing list