From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4D922A0A0E; Tue, 11 May 2021 19:55:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C70C44003F; Tue, 11 May 2021 19:55:49 +0200 (CEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by mails.dpdk.org (Postfix) with ESMTP id 2E2024003F for ; Tue, 11 May 2021 19:55:48 +0200 (CEST) Received: by mail-lf1-f43.google.com with SMTP id a2so8896357lfc.9 for ; Tue, 11 May 2021 10:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tNo9HFOqIPihXxdG13eENR14+r6O2H6vSJtXTjJrZPU=; b=jcT7QaPORx39inH+YIsc9RjkrEktUd9SbS6VKzzZm3cMyg6h/5F8vc83UiL0OvOWcB iYhlZ8ftgDU3F+rTuaKCg/I3Qz2ndgGoDgtu9n/mRX2I727hELxudHFwSBhSi4nAVWtn 60ycYSZSvUxrr8D6DF/5PY/Jkl4MNWv8akZ4WumjIcmeyvaodQMqgdR6kpIRati0qKOR 4rq9ayiOfVvwaqhyu4rtRYm4VFxa/ekwiEqGfAettz46s/hCFr9F/lv8vcdHrUxshQu3 IDlLRGU26q7IFrAVuJxlxVW67pPENnbTKtbpFiR0RRzSjkLmRcx43r3RBW8INqbWbtv+ d62A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tNo9HFOqIPihXxdG13eENR14+r6O2H6vSJtXTjJrZPU=; b=C5oSXTpKWEvxHoACVmTAuPfI3qVkYVNXxuWRiRi1SSrNCMFy1nAwiFAfyuk0lb757D bwA3ZaPme4/x41megan0++VuplpE6DpDV/Zl7I+kxczHaFHHIZKeCIZaLZTr4zFvJW9z 17G2hsEe8SGfW0TPNz90DBgjsqfp/+fg1PO55CzbCyHAaOedXbZZq8Y4qJANftJQbI0Z VkOcNdHucjXnqNKr/JNwXFuiwuHCz/RAxPglQn5cJa/FQ2uv0cMYMLFK0Gd2/FUumrNV byLI0imDcvjVhK9giRP2Kwvu5J9sB4xDQehLWgmBul4obAJ36/6jN0qA5b19aGralOq5 VOag== X-Gm-Message-State: AOAM5325ng2zVo+Fuskc/WVxyCBQFTc+WZorO6AcOU43IUc02IuNLR+b cnqihIuFoc9d0Mqmun73qorSilrbTsSF8BktRy57bA== X-Google-Smtp-Source: ABdhPJzz5H977QLFyE4vWkWGgwbQFJf8rRjJAt+bUL8y9iIpU5aoulx0Vbwdd7NTsSFdLKOzAxGCGCRdDs2JxXpzxdc= X-Received: by 2002:a05:6512:3e0e:: with SMTP id i14mr21693527lfv.298.1620755747604; Tue, 11 May 2021 10:55:47 -0700 (PDT) MIME-Version: 1.0 References: <20210506094452.1689-1-david.marchand@redhat.com> <20210506094452.1689-2-david.marchand@redhat.com> In-Reply-To: <20210506094452.1689-2-david.marchand@redhat.com> From: Ed Czeck Date: Tue, 11 May 2021 13:55:37 -0400 Message-ID: To: David Marchand Cc: dev@dpdk.org, stable@dpdk.org, Shepard Siegel , John Miller Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ark: fix leak on thread termination X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Thank you. Acked-by: Ed Czeck On Thu, May 6, 2021 at 5:45 AM David Marchand 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 > --- > 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 > +#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; > -- > 2.23.0 > >