service: fix crash on exit
authorHarry van Haaren <harry.van.haaren@intel.com>
Wed, 11 Mar 2020 14:39:27 +0000 (14:39 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 13 Mar 2020 12:56:46 +0000 (13:56 +0100)
commit33666b448f15687ceaf61eac405d945391fe7066
tree2209e7b62143eae3aa6d56579c6fcee631b7749d
parent8a4baf06c17a806696fb10aba36fce7471983028
service: fix crash on exit

This commit releases all service cores from their role,
returning them to ROLE_RTE on rte_service_finalize().

This fixes an issue relating to the service cores causing
a race-condition on rte_eal_cleanup(), where the service core
could still be executing while the main thread has already
free-d the service memory, leading to a segfault.

Fixes: da23f0aa87d8 ("service: fix memory leak with new function")
Cc: stable@dpdk.org
Reported-by: David Marchand <david.marchand@redhat.com>
Reported-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Aaron Conole <aconole@redhat.com>
lib/librte_eal/common/rte_service.c