[dpdk-stable] [PATCH 2/2] net/ice: fix leak on thread termination

David Marchand david.marchand at redhat.com
Thu May 6 11:44:52 CEST 2021


A terminated pthread should be joined or detached so that its associated
resources are released.

The "ice-reset-<vf_id>" threads are used to service some reset task in the
background, but they are never joined by the thread that created them.
The easiest solution is to detach new threads.

Fixes: 3b3757bda3c3 ("net/ice: get VF hardware index in DCF")
Cc: stable at dpdk.org

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 drivers/net/ice/ice_dcf_parent.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index c8e433239b..1d7aa8bc87 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -121,6 +121,8 @@ ice_dcf_vsi_update_service_handler(void *param)
 	struct ice_dcf_hw *hw = reset_param->dcf_hw;
 	struct ice_dcf_adapter *adapter;
 
+	pthread_detach(pthread_self());
+
 	rte_delay_us(ICE_DCF_VSI_UPDATE_SERVICE_INTERVAL);
 
 	rte_spinlock_lock(&vsi_update_lock);
-- 
2.23.0



More information about the stable mailing list