From: David Marchand Date: Tue, 11 May 2021 11:33:57 +0000 (+0200) Subject: net/ark: fix leak on thread termination X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b8b5dc6b9596a07cbeed03192b41a4befb75acc6;p=dpdk.git net/ark: fix leak on thread termination A terminated pthread should be joined or detached so that its associated resources are released. The "ark-delay-pg" thread is just used to delay some task but it is never joined by the thread that created it. The easiest solution is to detach the new thread. Fixes: 727b3fe292bc ("net/ark: integrate PMD") Cc: stable@dpdk.org Signed-off-by: David Marchand Acked-by: Ed Czeck --- diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c index 28a44f7546..515bfe461c 100644 --- a/drivers/net/ark/ark_pktgen.c +++ b/drivers/net/ark/ark_pktgen.c @@ -3,6 +3,7 @@ */ #include +#include #include #include @@ -474,6 +475,7 @@ ark_pktgen_delay_start(void *arg) * perform a blind sleep here to ensure that the external test * application has time to setup the test before we generate packets */ + pthread_detach(pthread_self()); usleep(100000); ark_pktgen_run(inst); return NULL;