From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F09E2A0527 for ; Mon, 9 Nov 2020 19:41:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E8826697C; Mon, 9 Nov 2020 19:41:27 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id 370D6697C for ; Mon, 9 Nov 2020 19:41:25 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id s8so2772645wrw.10 for ; Mon, 09 Nov 2020 10:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b2nJocLNAVjCIxRDEJUVpQ0Km8pkRX3/jHt/VL15xrg=; b=OBwAODtY5VzxNpKw9fZpeB7h2ci6h6yYHQMt7JKlYAhcAamJHztzeCUV593WSvocBA AJKAcnb8V1AnlNQToG9ZYBuad8/p1SggCMQBBVifKXpwhHH4Bjs1mf/PYhT/CPDpTLG/ 5/d3tQDo3pULHamKEmcR0NS8tx82ZAPj9HAPGOLXTytSynd9ss74HXycCWra3kZAhsjH lFbZgSgM1Ph9dFCEEo4aoiBB3cjZCSALkVFcF16GdfAkgXNoRp/DagpyZQizhILn8E0T RUCs0kqQtTtCzXaw7ihOCZD4X543MwCHKyLDjrn0WqXX1aSZ/OOOTgkGZ71tSVTBBvK+ rWQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b2nJocLNAVjCIxRDEJUVpQ0Km8pkRX3/jHt/VL15xrg=; b=idPIM2B58M8splcfc5XT0q5gI7r0BvofPl+FMitTN06GVreTdB7ax24b0RxaNkLE5z GIUR6Og5zt41kxbYFVO8vGFK6B9RA0Pv5oYzHiudzmn+VRSYjaXHoJh9avixj8JhJnxn PKE5mVxES9kwDrZ4brw/QOdUeKLLMadCSDoqlY/Xt7QsaL4C+t2dm6qQ+trQc/dmlDQo SeHq7pi9q9Lb+tUfZJIvjRfxdtPk56hQ6nTJbqZ/ugSwg/SKkBlcbx7ikOZmVCONhDme SUvCRyyViows9fl2y7DBvv2FQTf0bildJHgkxnV1cIrDtPdfFeADJR1afvx698/aA5bf mvxg== X-Gm-Message-State: AOAM531AAKBTlR9DaQnOhHMfHhF7M7bxQvCgr5f2URuviQ+g2XE+rTvF or14Cg7ivjjjj3J36ju9QZI= X-Google-Smtp-Source: ABdhPJwyjrfiABRLM4QIfCh8sVpbIipdUKSumcD/c+kBbDtOw1UU7q3DSXSdKwOhbkATbTREvJPLzA== X-Received: by 2002:a05:6000:1d1:: with SMTP id t17mr20514328wrx.164.1604947284974; Mon, 09 Nov 2020 10:41:24 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m21sm757247wmi.3.2020.11.09.10.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 10:41:24 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Yipeng Wang , dpdk stable Date: Mon, 9 Nov 2020 18:39:49 +0000 Message-Id: <20201109184111.3463090-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201028104606.3504127-207-luca.boccassi@gmail.com> References: <20201028104606.3504127-207-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'efd: fix tailq entry leak in error path' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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" Hi, FYI, your patch has been queued to stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/11/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 Thanks. Luca Boccassi --- >From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Tue, 29 Sep 2020 11:31:35 +0800 Subject: [PATCH] efd: fix tailq entry leak in error path [ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ] In rte_efd_create() allocated memory for tailq entry, we should free it when error happens, otherwise it will lead to memory leak. Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") Signed-off-by: Yunjian Wang Acked-by: Yipeng Wang --- lib/librte_efd/rte_efd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index 4deeb17924..3fd1f1c97b 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, error_unlock_exit: rte_mcfg_tailq_write_unlock(); + rte_free(te); rte_efd_free(table); return NULL; -- 2.27.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-09 18:40:11.273309985 +0000 +++ 0001-efd-fix-tailq-entry-leak-in-error-path.patch 2020-11-09 18:40:11.063310224 +0000 @@ -1 +1 @@ -From c2402fcaf937b17da2b886443c3733b4234eea68 Mon Sep 17 00:00:00 2001 +From 1ff9a185c8402e9a5ac8f20c92b00c6b99f03b28 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c2402fcaf937b17da2b886443c3733b4234eea68 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index ec3a4cd58e..77f46809f8 100644 +index 4deeb17924..3fd1f1c97b 100644 @@ -22 +23 @@ -@@ -711,6 +711,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, +@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,