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 E496BA0C3F for ; 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 CD213406A3; Tue, 11 May 2021 19:55:50 +0200 (CEST) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 2D49F4003E for ; Tue, 11 May 2021 19:55:48 +0200 (CEST) Received: by mail-lf1-f49.google.com with SMTP id g4so473414lfv.6 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=fssitrfccqeMrdOhi71oZdb2ENHQsKIX7C8NGDlDo/K855jrH9taiaSjvASvtJc+js TkqvzAikQs7CEagqxfP6FzgpA82o4HlpoaSnW2XhRD3F9mtZye/X7fu073AwWpajLYpE 6xnUDkTlTkIcP+GJDwVs9lOhy9XMn4V9AkyCXlqr+8BPquJ/dgqULIv5w6vDx7YW32yU pVL4jPQAxUQeCgHYkbFIV0FhVfbZ1UJFB2L6eV9Yx+TmEYNn0E9TCcBB+k0lw8VbiQsi 2TUaOmj4/pbW0q//rD+0swRZ+Fd5asvNtYX3KDcLJZ5PKe5gN0ILdKIBbCda39U34iP+ Td/g== X-Gm-Message-State: AOAM532nH00cQ3E1cZunPgXO/GAK6l/Vg21u+TdRYhU6bpmKdOey1wzG 7qrvbWT7OWX+meaN1dOoivM6ExQWIvG3FB3PALeWOQ== 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-stable] [PATCH 1/2] net/ark: fix leak on thread termination X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 > >