All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Czeck <ed.czeck@atomicrules.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, stable@dpdk.org,
	 Shepard Siegel <shepard.siegel@atomicrules.com>,
	John Miller <john.miller@atomicrules.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] net/ark: fix leak on thread termination
Date: Tue, 11 May 2021 13:55:37 -0400	[thread overview]
Message-ID: <CALZ3GujiXZWK8n0KJQvLRwELcBuXpXQBjKsSnNwLZfCivrvT=A@mail.gmail.com> (raw)
In-Reply-To: <20210506094452.1689-2-david.marchand@redhat.com>

Thank you.

Acked-by: Ed Czeck <ed.czeck@atomicrules.com>


On Thu, May 6, 2021 at 5:45 AM David Marchand <david.marchand@redhat.com>
wrote:

> 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 <david.marchand@redhat.com>
> ---
>  drivers/net/ark/ark_pktgen.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> 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 <unistd.h>
> +#include <pthread.h>
>
>  #include <rte_string_fns.h>
>  #include <rte_malloc.h>
> @@ -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;
> --
> 2.23.0
>
>

  reply	other threads:[~2021-05-11 17:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06  9:44 [dpdk-dev] [PATCH 0/2] Thread termination leak fixes David Marchand
2021-05-06  9:44 ` [dpdk-dev] [PATCH 1/2] net/ark: fix leak on thread termination David Marchand
2021-05-11 17:55   ` Ed Czeck [this message]
2021-05-06  9:44 ` [dpdk-dev] [PATCH 2/2] net/ice: " David Marchand
2021-05-06 10:31   ` Wang, Haiyue
2021-05-07  8:13   ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-05-07 17:14     ` Dmitry Kozlyuk
2021-05-11 11:33 ` [dpdk-dev] [PATCH v2 0/2] Thread termination leak fixes David Marchand
2021-05-11 11:33   ` [dpdk-dev] [PATCH v2 1/2] net/ark: fix leak on thread termination David Marchand
2021-05-11 11:33   ` [dpdk-dev] [PATCH v2 2/2] net/ice: " David Marchand
2021-05-11 17:34     ` Dmitry Kozlyuk
2021-05-11 21:41   ` [dpdk-dev] [PATCH v2 0/2] Thread termination leak fixes Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALZ3GujiXZWK8n0KJQvLRwELcBuXpXQBjKsSnNwLZfCivrvT=A@mail.gmail.com' \
    --to=ed.czeck@atomicrules.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=john.miller@atomicrules.com \
    --cc=shepard.siegel@atomicrules.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.