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 5A070A0527 for ; Mon, 9 Nov 2020 19:41:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D392697C; Mon, 9 Nov 2020 19:41:33 +0100 (CET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by dpdk.org (Postfix) with ESMTP id A1BEC72ED for ; Mon, 9 Nov 2020 19:41:31 +0100 (CET) Received: by mail-wm1-f54.google.com with SMTP id h2so465799wmm.0 for ; Mon, 09 Nov 2020 10:41:31 -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=a/FdiWxegIiMW+WLDOSXBPRglqVJB494Gh1Wk+1YZXs=; b=b0PmGerqRneqz2+0ITuK6knkVHerBSbbra36G8XBTfaNzJ6y3I5VLLFv4UNHwZJHYb s5VavNmijqpwt5xfCdEjRYSK02M94hlB3vnomLfk9O2KSZmzEy7qypSnC75fQQV/ZIiW svkplkzK9vSQTxWMj8AAqNp85f3RaBAJ8oxcZui4sxDAIRicVeMp/hiJrG0/nDf5/o1d q6AsgavV94XWy23doO5g+XxGHlURBTg9Yzbr9acdkoFfS6x6EidFek+oJtsMiQewoslV rrhXyMMuVVDp/HAq2Zc7oCXTSAoCIsde6muYlwOr4pt3s/RJqUM23fU2tpXzpP4NnlQT tNkA== 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=a/FdiWxegIiMW+WLDOSXBPRglqVJB494Gh1Wk+1YZXs=; b=W4uCJLZQCMZJJ6IM6/xCw5ympj9/UiDjmeRA9Co0tzFXe6ybBl+LR/TFFhgKeKzavH xMg5+Bzv0bxnuUMjtcNzex07ULX/PW4VIEPP0bqj7aje70sS4YhaokJvBP3peUJMXVdZ z7lD9TFs/qXFRFWEkBZt534MFO01U/kHYgRyQSSnm+YKg8XqHTo0bFHKZUk+e2G6BQNC /ii5wg/0+vuoenr/as3jGk0aWi3x9nl2VkhChInHxTzmV4CTigFR9Tbef0cESVB35h6F vWC85fUd89kzzWw/Rfd8aHsHwkE/0rhVoM21buFOtixpsU2EjDA6GCKmqfmQasFf0A9L q7og== X-Gm-Message-State: AOAM531/oj/YHcdAx7XOnaPxtOyFUHqQBXYqhVpcBJLuSLnCID277aaK HhTEChpMmty4DnS+mT0JLZY= X-Google-Smtp-Source: ABdhPJxER0rYfQO6qhDz2MaztzX2nJBwJx8vNl5rARqsvnDgvRgR627HZjY+SlQwM5lzUsSb8AkwQg== X-Received: by 2002:a1c:3c44:: with SMTP id j65mr561409wma.13.1604947290382; Mon, 09 Nov 2020 10:41:30 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 15sm337971wmg.1.2020.11.09.10.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 10:41:29 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Jeff Guo , David Marchand , dpdk stable Date: Mon, 9 Nov 2020 18:39:53 +0000 Message-Id: <20201109184111.3463090-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201109184111.3463090-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-207-luca.boccassi@gmail.com> <20201109184111.3463090-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'eal: fix leak on device event callback unregister' 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/6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Thanks. Luca Boccassi --- >From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Wed, 21 Oct 2020 19:19:03 +0800 Subject: [PATCH] eal: fix leak on device event callback unregister [ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ] The event_cb->dev_name is not freed when freeing event_cb, and this causes a memory leak. Fixes: a753e53d517b ("eal: add device event monitor framework") Signed-off-by: Yunjian Wang Acked-by: Jeff Guo Acked-by: David Marchand --- lib/librte_eal/common/eal_common_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 9e4f09d83e..363a2ca95e 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -526,6 +526,7 @@ rte_dev_event_callback_unregister(const char *device_name, */ if (event_cb->active == 0) { TAILQ_REMOVE(&dev_event_cbs, event_cb, next); + free(event_cb->dev_name); free(event_cb); ret++; } else { -- 2.27.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-09 18:40:11.423213542 +0000 +++ 0005-eal-fix-leak-on-device-event-callback-unregister.patch 2020-11-09 18:40:11.067310286 +0000 @@ -1 +1 @@ -From c78bd27d4b74a74261b180cb8d5421b919c1ab9a Mon Sep 17 00:00:00 2001 +From 6461d31b0b5e9fe79121c1cde300c3e1a3b2a3e5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c78bd27d4b74a74261b180cb8d5421b919c1ab9a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org