* [dpdk-dev] [PATCH] lpm: fix memory leak
@ 2016-03-15 12:25 Olivier Matz
2016-03-16 13:11 ` Olivier MATZ
0 siblings, 1 reply; 4+ messages in thread
From: Olivier Matz @ 2016-03-15 12:25 UTC (permalink / raw)
To: dev
Internal lpm structures are not properly freed. Seen with the
lpm6 autotest.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_lpm/rte_lpm.c | 3 +++
lib/librte_lpm/rte_lpm6.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index dd62f9b..d28e954 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -318,6 +318,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
if (lpm->tbl8 == NULL) {
RTE_LOG(ERR, LPM, "LPM memory allocation failed\n");
+ rte_free(lpm->rules_tbl);
rte_free(lpm);
rte_free(te);
goto exit;
@@ -406,6 +407,8 @@ rte_lpm_free_v1604(struct rte_lpm *lpm)
rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+ rte_free(lpm->tbl8);
+ rte_free(lpm->rules_tbl);
rte_free(lpm);
rte_free(te);
}
diff --git a/lib/librte_lpm/rte_lpm6.c b/lib/librte_lpm/rte_lpm6.c
index 4e9f2d0..faf7684 100644
--- a/lib/librte_lpm/rte_lpm6.c
+++ b/lib/librte_lpm/rte_lpm6.c
@@ -288,6 +288,7 @@ rte_lpm6_free(struct rte_lpm6 *lpm)
rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
+ rte_free(lpm->rules_tbl);
rte_free(lpm);
rte_free(te);
}
--
2.1.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] lpm: fix memory leak
2016-03-15 12:25 [dpdk-dev] [PATCH] lpm: fix memory leak Olivier Matz
@ 2016-03-16 13:11 ` Olivier MATZ
2016-03-16 13:21 ` Christian Ehrhardt
0 siblings, 1 reply; 4+ messages in thread
From: Olivier MATZ @ 2016-03-16 13:11 UTC (permalink / raw)
To: dev
On 03/15/2016 01:25 PM, Olivier Matz wrote:
> Internal lpm structures are not properly freed. Seen with the
> lpm6 autotest.
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> lib/librte_lpm/rte_lpm.c | 3 +++
> lib/librte_lpm/rte_lpm6.c | 1 +
> 2 files changed, 4 insertions(+)
>
Self-nack, Christian already submitted a series about it:
http://dpdk.org/dev/patchwork/patch/11543/
http://dpdk.org/dev/patchwork/patch/11544/
http://dpdk.org/dev/patchwork/patch/11545/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] lpm: fix memory leak
2016-03-16 13:11 ` Olivier MATZ
@ 2016-03-16 13:21 ` Christian Ehrhardt
2016-03-16 14:20 ` Christian Ehrhardt
0 siblings, 1 reply; 4+ messages in thread
From: Christian Ehrhardt @ 2016-03-16 13:21 UTC (permalink / raw)
To: Olivier MATZ, Bruce Richardson; +Cc: dev
Thanks Oliver, the bad thing was that I forgot to CC dpdk-dev last friday.
I just resubmitted correcting that mistake.
I think it should now just be down to the re-review and apply of Bruce.
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
On Wed, Mar 16, 2016 at 2:11 PM, Olivier MATZ <olivier.matz@6wind.com>
wrote:
>
>
> On 03/15/2016 01:25 PM, Olivier Matz wrote:
>
>> Internal lpm structures are not properly freed. Seen with the
>> lpm6 autotest.
>>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>> ---
>> lib/librte_lpm/rte_lpm.c | 3 +++
>> lib/librte_lpm/rte_lpm6.c | 1 +
>> 2 files changed, 4 insertions(+)
>>
>>
> Self-nack, Christian already submitted a series about it:
>
> http://dpdk.org/dev/patchwork/patch/11543/
> http://dpdk.org/dev/patchwork/patch/11544/
> http://dpdk.org/dev/patchwork/patch/11545/
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] lpm: fix memory leak
2016-03-16 13:21 ` Christian Ehrhardt
@ 2016-03-16 14:20 ` Christian Ehrhardt
0 siblings, 0 replies; 4+ messages in thread
From: Christian Ehrhardt @ 2016-03-16 14:20 UTC (permalink / raw)
To: Olivier MATZ, Bruce Richardson; +Cc: dev
Hi,
I'm done comparing our two patches and just submitted a v3 of my series
based on that.
I found even more use after free and leaks than we had before.
Patch series has grown to 5 patches now.
At least my gmail groups subsequent git send-email posts weirdly, let me
know if you are in any trouble reviewing applying them.
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
On Wed, Mar 16, 2016 at 2:21 PM, Christian Ehrhardt <
christian.ehrhardt@canonical.com> wrote:
> Thanks Oliver, the bad thing was that I forgot to CC dpdk-dev last friday.
> I just resubmitted correcting that mistake.
>
> I think it should now just be down to the re-review and apply of Bruce.
>
> Christian Ehrhardt
> Software Engineer, Ubuntu Server
> Canonical Ltd
>
> On Wed, Mar 16, 2016 at 2:11 PM, Olivier MATZ <olivier.matz@6wind.com>
> wrote:
>
>>
>>
>> On 03/15/2016 01:25 PM, Olivier Matz wrote:
>>
>>> Internal lpm structures are not properly freed. Seen with the
>>> lpm6 autotest.
>>>
>>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
>>> ---
>>> lib/librte_lpm/rte_lpm.c | 3 +++
>>> lib/librte_lpm/rte_lpm6.c | 1 +
>>> 2 files changed, 4 insertions(+)
>>>
>>>
>> Self-nack, Christian already submitted a series about it:
>>
>> http://dpdk.org/dev/patchwork/patch/11543/
>> http://dpdk.org/dev/patchwork/patch/11544/
>> http://dpdk.org/dev/patchwork/patch/11545/
>>
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-16 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 12:25 [dpdk-dev] [PATCH] lpm: fix memory leak Olivier Matz
2016-03-16 13:11 ` Olivier MATZ
2016-03-16 13:21 ` Christian Ehrhardt
2016-03-16 14:20 ` Christian Ehrhardt
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).