DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler
@ 2018-12-05  2:50 gfree.wind
  2018-12-05  2:50 ` [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section gfree.wind
  2018-12-10 16:38 ` [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler Burakov, Anatoly
  0 siblings, 2 replies; 5+ messages in thread
From: gfree.wind @ 2018-12-05  2:50 UTC (permalink / raw)
  To: dev; +Cc: Gao Feng

From: Gao Feng <davidfgao@tencent.com>

When rte_eal_alarm_set failed, need to free the bundle mem in the
error handler of handle_primary_request and handle_secondary_request.

Signed-off-by: Gao Feng <davidfgao@tencent.com>
---
 lib/librte_eal/common/hotplug_mp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eal/common/hotplug_mp.c b/lib/librte_eal/common/hotplug_mp.c
index 070e2e0..9d610a8 100644
--- a/lib/librte_eal/common/hotplug_mp.c
+++ b/lib/librte_eal/common/hotplug_mp.c
@@ -208,6 +208,8 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
 	ret = rte_eal_alarm_set(1, __handle_secondary_request, bundle);
 	if (ret != 0) {
 		RTE_LOG(ERR, EAL, "failed to add mp task\n");
+		free(bundle->peer);
+		free(bundle);
 		return send_response_to_secondary(req, ret, peer);
 	}
 	return 0;
@@ -332,6 +334,8 @@ static void __handle_primary_request(void *param)
 	 */
 	ret = rte_eal_alarm_set(1, __handle_primary_request, bundle);
 	if (ret != 0) {
+		free(bundle->peer);
+		free(bundle);
 		resp->result = ret;
 		ret = rte_mp_reply(&mp_resp, peer);
 		if  (ret != 0) {
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section
  2018-12-05  2:50 [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler gfree.wind
@ 2018-12-05  2:50 ` gfree.wind
  2018-12-05  3:46   ` Gao Feng
  2018-12-10 16:38 ` [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler Burakov, Anatoly
  1 sibling, 1 reply; 5+ messages in thread
From: gfree.wind @ 2018-12-05  2:50 UTC (permalink / raw)
  To: dev; +Cc: David Marchand, stable

From: David Marchand <david.marchand@redhat.com>

The incriminated commit did relax the condition to catch all sections
but dropped the + removal which can trigger false detection of the
special EXPERIMENTAL section when adding symbols and the section in the
same patch.

Fixes: 7281cf520f89 ("devtools: relax rule for identifying symbol section")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
---
 devtools/check-symbol-change.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
index 4b8d9f3..020da7e 100755
--- a/devtools/check-symbol-change.sh
+++ b/devtools/check-symbol-change.sh
@@ -31,6 +31,7 @@ build_map_changes()
 		# Triggering this rule sets in_sec to 1, which actives the
 		# symbol rule below
 		/^.*{/ {
+			gsub("+", "");
 			if (in_map == 1) {
 				sec=$(NF-1); in_sec=1;
 			}
-- 
2.7.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section
  2018-12-05  2:50 ` [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section gfree.wind
@ 2018-12-05  3:46   ` Gao Feng
  0 siblings, 0 replies; 5+ messages in thread
From: Gao Feng @ 2018-12-05  3:46 UTC (permalink / raw)
  To: 我; +Cc: dev, David Marchand, stable

Sorry for the noise. Please ignore this reply.

It is caused by wrong command.

Best Regards
Feng

At 2018-12-05 10:50:26, "" <gfree.wind@vip.163.com> wrote:
>From: David Marchand <david.marchand@redhat.com>
>
>The incriminated commit did relax the condition to catch all sections
>but dropped the + removal which can trigger false detection of the
>special EXPERIMENTAL section when adding symbols and the section in the
>same patch.
>
>Fixes: 7281cf520f89 ("devtools: relax rule for identifying symbol section")
>Cc: stable@dpdk.org
>
>Signed-off-by: David Marchand <david.marchand@redhat.com>
>Acked-by: Neil Horman <nhorman@tuxdriver.com>
>---
> devtools/check-symbol-change.sh | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/devtools/check-symbol-change.sh b/devtools/check-symbol-change.sh
>index 4b8d9f3..020da7e 100755
>--- a/devtools/check-symbol-change.sh
>+++ b/devtools/check-symbol-change.sh
>@@ -31,6 +31,7 @@ build_map_changes()
> 		# Triggering this rule sets in_sec to 1, which actives the
> 		# symbol rule below
> 		/^.*{/ {
>+			gsub("+", "");
> 			if (in_map == 1) {
> 				sec=$(NF-1); in_sec=1;
> 			}
>-- 
>2.7.4
>
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler
  2018-12-05  2:50 [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler gfree.wind
  2018-12-05  2:50 ` [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section gfree.wind
@ 2018-12-10 16:38 ` Burakov, Anatoly
  2018-12-19 22:03   ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Burakov, Anatoly @ 2018-12-10 16:38 UTC (permalink / raw)
  To: gfree.wind, dev; +Cc: Gao Feng

On 05-Dec-18 2:50 AM, gfree.wind@vip.163.com wrote:
> From: Gao Feng <davidfgao@tencent.com>
> 
> When rte_eal_alarm_set failed, need to free the bundle mem in the
> error handler of handle_primary_request and handle_secondary_request.
> 
> Signed-off-by: Gao Feng <davidfgao@tencent.com>
> ---

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler
  2018-12-10 16:38 ` [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler Burakov, Anatoly
@ 2018-12-19 22:03   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-12-19 22:03 UTC (permalink / raw)
  To: Gao Feng; +Cc: dev, Burakov, Anatoly, gfree.wind

10/12/2018 17:38, Burakov, Anatoly:
> On 05-Dec-18 2:50 AM, gfree.wind@vip.163.com wrote:
> > From: Gao Feng <davidfgao@tencent.com>
> > 
> > When rte_eal_alarm_set failed, need to free the bundle mem in the
> > error handler of handle_primary_request and handle_secondary_request.
> > 
> > Signed-off-by: Gao Feng <davidfgao@tencent.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-19 22:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05  2:50 [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler gfree.wind
2018-12-05  2:50 ` [dpdk-dev] [PATCH] devtools: fix symbol check when adding experimental section gfree.wind
2018-12-05  3:46   ` Gao Feng
2018-12-10 16:38 ` [dpdk-dev] [PATCH] eal: fix memleak on mp request error handler Burakov, Anatoly
2018-12-19 22:03   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).