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 3F5E5A0C48 for ; Wed, 16 Jun 2021 03:07:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0690940140; Wed, 16 Jun 2021 03:07:49 +0200 (CEST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by mails.dpdk.org (Postfix) with ESMTP id 992D240140 for ; Wed, 16 Jun 2021 03:07:47 +0200 (CEST) Received: by mail-lf1-f52.google.com with SMTP id r198so1252981lff.11 for ; Tue, 15 Jun 2021 18:07:47 -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=FDrFEuX4WTZcCdBGRQwke2rWnicA6lFHOp8sBD3ygEs=; b=fZ+aYB4pLp2rE/TVVXMhY+Sq10qsu2kgWpwRNNw6CbKtMfUvUY2U6aowjRo7aJcK4X qAyU4Nfzam7jLqeOFs3/bzAWepE4Us44Z1D5KQ6yE0282fF5AbvbcB5MoZ3mWsGBwEXS zcgntuYjYCl/nOyLb240vjXceTvTOsvdMi5ZDa27zpJBK+TUKJIkYeamat9VgDxtXV9E lHspj/o1X3aCwHrKoa4eNeDXFxFbV0PFqNAJgW8/0UnIM9Sdp1bXHdG9wBKGTCI4Dnhd 9+5HriO5f88d/XG8leUbu+qll5WWQlma2p37Yu+GY9/PHXlGeXymfEiVvZzeKFAV5S5h NqtQ== 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=FDrFEuX4WTZcCdBGRQwke2rWnicA6lFHOp8sBD3ygEs=; b=WS/J9hXC9HruFR7mlHpVOUhDJZH6kRtw2wBZAHA1RO7r7oET21yn6bbubaHtWBTQ4e gVG6sS+wg/2BC5i8ghC4duzVOjMFEZw4vyvmzPzPO/1vEU0X34n+lwDwwbrYmWDEokHB LMj2YdQf4Baui5slt5TdDhcF6AS5qbYglz2Hw+PdGyUVd0dah12aygAQRGTOJa67OzaE NQXqPKHBDvQ8U+y4EDRRXrNKEDRrK2z+/qdO8wt3flW90bbUhzytWu8GigQve36CJyzG MvnWfkGPwdaiDmG965dAzexk6zW7RPBtV5KTQN+GFv61RNetl9wah/MLQVVLziOqw9uO No2g== X-Gm-Message-State: AOAM533zq5jsOh+XuO3bryaZtIFktD+AeX+Lzo11SLsifc4FtJW5pvFe w+xivwL35tYnNv3+oWO+r63KVh7+kvU1XA+y5XkaTQ== X-Google-Smtp-Source: ABdhPJxXH9gEgyZDj1ZWvhDrvAodUhVoxk4o/el9iAaLHeU2qBGBAIzdLeLPfd67SKANBC59oDD2PGdnZLGurTWiQyo= X-Received: by 2002:a19:6a0e:: with SMTP id u14mr1655713lfu.184.1623805667007; Tue, 15 Jun 2021 18:07:47 -0700 (PDT) MIME-Version: 1.0 References: <20210615122211.25457-1-david.marchand@redhat.com> In-Reply-To: <20210615122211.25457-1-david.marchand@redhat.com> From: Ed Czeck Date: Tue, 15 Jun 2021 21:07:56 -0400 Message-ID: To: David Marchand Cc: stable@dpdk.org, xuemingl@nvidia.com, 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 20.11] 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" Thanks, Acked-by: Ed Czeck On Tue, Jun 15, 2021 at 8:22 AM David Marchand wrote: > [ upstream commit b8b5dc6b9596a07cbeed03192b41a4befb75acc6 ] > > 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") > > Signed-off-by: David Marchand > --- > drivers/net/ark/ark_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c > index 0156eeb66e..c307880ec1 100644 > --- a/drivers/net/ark/ark_ethdev.c > +++ b/drivers/net/ark/ark_ethdev.c > @@ -2,6 +2,7 @@ > * Copyright (c) 2015-2018 Atomic Rules LLC > */ > > +#include > #include > #include > #include > @@ -585,6 +586,7 @@ delay_pg_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(ark->pg); > return NULL; > -- > 2.23.0 > >