[PATCH] [PATCH v3] lib/ethdev: fix segfault in secondary process by validating dev_private pointer

Khadem Ullah 14pwcse1224 at uetpeshawar.edu.pk
Thu Jul 24 07:49:03 CEST 2025


Hi Stephen,

Thanks for the feedback.

This patch doesn’t monitor the primary process, it only adds basic checks to prevent crashes when the secondary 
process calls certain APIs after the primary has exited. Right now, I think, only specific apps like `dumpcap` 
use `enable_primary_monitor`, but most (like `testpmd`) don’t monitor the primary at all.

I understand your point about improving the whole primary-secondary monitoring system using a better method
 like Unix domain sockets instead of lock files. That would definitely be a cleaner and more reliable solution, 
and I’d be glad to help with that in future work.

However, even with better monitoring, we would still need the checks in this patch. They’re basic safety checks 
that help avoid crashes in any case, for example, when the API is called with null or invalid data. So I see 
this patch as a necessary short-term fix that doesn’t replace, but supports, any long-term redesign.

Best regards,
Khadem



More information about the stable mailing list