* [dpdk-dev] [PATCH v1] app: fix Coverity issues
@ 2016-06-20 13:49 Remy Horton
2016-06-20 13:56 ` Thomas Monjalon
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
0 siblings, 2 replies; 10+ messages in thread
From: Remy Horton @ 2016-06-20 13:49 UTC (permalink / raw)
To: pablo.de.lara.guarch; +Cc: dev
Fixes memory leaks detected by Coverity. These are due to ephemeral
memory allocations not being freed when errors occur.
Coverity issue 127348: Resource leak
Coverity issue 127349: Resource leak
Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")
Signed-off-by: Remy Horton <remy.horton@intel.com>
---
app/test-pmd/config.c | 3 +++
examples/l2fwd-keepalive/shm.c | 2 ++
2 files changed, 5 insertions(+)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 10f0a36..cb71c09 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -281,6 +281,7 @@ nic_xstats_display(portid_t port_id)
if (cnt_xstats != rte_eth_xstats_get_names(
port_id, xstats_names, cnt_xstats)) {
printf("Error: Cannot get xstats lookup\n");
+ free(xstats_names);
return;
}
@@ -293,6 +294,8 @@ nic_xstats_display(portid_t port_id)
}
if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) {
printf("Error: Unable to get xstats\n");
+ free(xstats_names);
+ free(xstats);
return;
}
diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c
index 66fc433..177aa5b 100644
--- a/examples/l2fwd-keepalive/shm.c
+++ b/examples/l2fwd-keepalive/shm.c
@@ -80,6 +80,8 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void)
RTE_LOG(INFO, EAL,
"Failed to setup SHM semaphore (%s)\n",
strerror(errno));
+ munmap(ka_shm,
+ sizeof(struct rte_keepalive_shm));
return NULL;
}
--
2.5.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v1] app: fix Coverity issues
2016-06-20 13:49 [dpdk-dev] [PATCH v1] app: fix Coverity issues Remy Horton
@ 2016-06-20 13:56 ` Thomas Monjalon
2016-06-20 14:50 ` Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
1 sibling, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2016-06-20 13:56 UTC (permalink / raw)
To: Remy Horton; +Cc: dev, pablo.de.lara.guarch
2016-06-20 14:49, Remy Horton:
> Fixes memory leaks detected by Coverity. These are due to ephemeral
> memory allocations not being freed when errors occur.
>
> Coverity issue 127348: Resource leak
> Coverity issue 127349: Resource leak
>
> Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")
>
> Signed-off-by: Remy Horton <remy.horton@intel.com>
> ---
> app/test-pmd/config.c | 3 +++
> examples/l2fwd-keepalive/shm.c | 2 ++
It looks to be 2 patches: one for xstats and the other for keepalive.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v1] app: fix Coverity issues
2016-06-20 13:56 ` Thomas Monjalon
@ 2016-06-20 14:50 ` Remy Horton
0 siblings, 0 replies; 10+ messages in thread
From: Remy Horton @ 2016-06-20 14:50 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, pablo.de.lara.guarch
On 20/06/2016 14:56, Thomas Monjalon wrote:
[..]
> It looks to be 2 patches: one for xstats and the other for keepalive.
>
Ok, will seperate. I combined them since they were the same small fix in
multiple places.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] fix Coverity issues
2016-06-20 13:49 [dpdk-dev] [PATCH v1] app: fix Coverity issues Remy Horton
2016-06-20 13:56 ` Thomas Monjalon
@ 2016-06-20 15:23 ` Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
` (2 more replies)
1 sibling, 3 replies; 10+ messages in thread
From: Remy Horton @ 2016-06-20 15:23 UTC (permalink / raw)
To: dev
Fixes memory leaks detected by Coverity. These are due to ephemeral
memory allocations not being freed when errors occur.
--
v2 changes:
* Split patch into two
Remy Horton (2):
app/test-pmd: fix Coverity issues
examples/l2fwd-keepalive: fix Coverity issues
app/test-pmd/config.c | 3 +++
examples/l2fwd-keepalive/shm.c | 2 ++
2 files changed, 5 insertions(+)
--
2.5.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 1/2] app/test-pmd: fix Coverity issues
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
@ 2016-06-20 15:23 ` Remy Horton
2016-06-20 15:33 ` De Lara Guarch, Pablo
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-keepalive: " Remy Horton
2016-06-21 13:58 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
2 siblings, 1 reply; 10+ messages in thread
From: Remy Horton @ 2016-06-20 15:23 UTC (permalink / raw)
To: dev, Pablo de Lara
Fixes memory leaks detected by Coverity. These are due to ephemeral
memory allocations not being freed when errors occur.
Coverity issue 127348: Resource leak
Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")
Signed-off-by: Remy Horton <remy.horton@intel.com>
---
app/test-pmd/config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 10f0a36..cb71c09 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -281,6 +281,7 @@ nic_xstats_display(portid_t port_id)
if (cnt_xstats != rte_eth_xstats_get_names(
port_id, xstats_names, cnt_xstats)) {
printf("Error: Cannot get xstats lookup\n");
+ free(xstats_names);
return;
}
@@ -293,6 +294,8 @@ nic_xstats_display(portid_t port_id)
}
if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) {
printf("Error: Unable to get xstats\n");
+ free(xstats_names);
+ free(xstats);
return;
}
--
2.5.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-keepalive: fix Coverity issues
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
@ 2016-06-20 15:23 ` Remy Horton
2016-06-21 13:58 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
2 siblings, 0 replies; 10+ messages in thread
From: Remy Horton @ 2016-06-20 15:23 UTC (permalink / raw)
To: dev
Fixes memory leaks detected by Coverity. These are due to ephemeral
memory allocations not being freed when errors occur.
Coverity issue 127349: Resource leak
Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")
Signed-off-by: Remy Horton <remy.horton@intel.com>
---
examples/l2fwd-keepalive/shm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c
index 66fc433..177aa5b 100644
--- a/examples/l2fwd-keepalive/shm.c
+++ b/examples/l2fwd-keepalive/shm.c
@@ -80,6 +80,8 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void)
RTE_LOG(INFO, EAL,
"Failed to setup SHM semaphore (%s)\n",
strerror(errno));
+ munmap(ka_shm,
+ sizeof(struct rte_keepalive_shm));
return NULL;
}
--
2.5.5
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/2] app/test-pmd: fix Coverity issues
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
@ 2016-06-20 15:33 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 10+ messages in thread
From: De Lara Guarch, Pablo @ 2016-06-20 15:33 UTC (permalink / raw)
To: Horton, Remy, dev
Hi Remy,
> -----Original Message-----
> From: Horton, Remy
> Sent: Monday, June 20, 2016 4:23 PM
> To: dev@dpdk.org; De Lara Guarch, Pablo
> Subject: [PATCH v2 1/2] app/test-pmd: fix Coverity issues
>
> Fixes memory leaks detected by Coverity. These are due to ephemeral
> memory allocations not being freed when errors occur.
>
> Coverity issue 127348: Resource leak
>
> Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch")
>
> Signed-off-by: Remy Horton <remy.horton@intel.com>
It would be better to change the title, so it says what are you fixing exactly (i.e. testpmd: fix resource leak)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] fix Coverity issues
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-keepalive: " Remy Horton
@ 2016-06-21 13:58 ` Thomas Monjalon
2 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2016-06-21 13:58 UTC (permalink / raw)
To: Remy Horton; +Cc: dev
> Remy Horton (2):
> app/test-pmd: fix Coverity issues
> examples/l2fwd-keepalive: fix Coverity issues
Applied with titles reworded as suggested by Pablo, thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/2] fix coverity issues
2016-06-26 15:46 ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Helin Zhang
@ 2016-06-28 12:01 ` Bruce Richardson
0 siblings, 0 replies; 10+ messages in thread
From: Bruce Richardson @ 2016-06-28 12:01 UTC (permalink / raw)
To: Helin Zhang; +Cc: dev
On Sun, Jun 26, 2016 at 11:46:16PM +0800, Helin Zhang wrote:
> It fixes several problematic dereference issues and missing
> break issue reported by Coverity.
>
> Helin Zhang (2):
> i40e: fix problematic dereference
> i40e: fix missing break in switch
>
> drivers/net/i40e/i40e_pf.c | 11 +++++------
> drivers/net/i40e/i40e_rxtx.c | 12 ++++++++----
> 2 files changed, 13 insertions(+), 10 deletions(-)
>
> --
Applied to dpdk-next-net/rel_16_07
/Bruce
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-dev] [PATCH v2 0/2] fix coverity issues
2016-04-21 3:42 [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference Helin Zhang
@ 2016-06-26 15:46 ` Helin Zhang
2016-06-28 12:01 ` Bruce Richardson
0 siblings, 1 reply; 10+ messages in thread
From: Helin Zhang @ 2016-06-26 15:46 UTC (permalink / raw)
To: dev; +Cc: Helin Zhang
It fixes several problematic dereference issues and missing
break issue reported by Coverity.
Helin Zhang (2):
i40e: fix problematic dereference
i40e: fix missing break in switch
drivers/net/i40e/i40e_pf.c | 11 +++++------
drivers/net/i40e/i40e_rxtx.c | 12 ++++++++----
2 files changed, 13 insertions(+), 10 deletions(-)
--
2.5.0
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-06-28 12:01 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 13:49 [dpdk-dev] [PATCH v1] app: fix Coverity issues Remy Horton
2016-06-20 13:56 ` Thomas Monjalon
2016-06-20 14:50 ` Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 0/2] " Remy Horton
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 1/2] app/test-pmd: " Remy Horton
2016-06-20 15:33 ` De Lara Guarch, Pablo
2016-06-20 15:23 ` [dpdk-dev] [PATCH v2 2/2] examples/l2fwd-keepalive: " Remy Horton
2016-06-21 13:58 ` [dpdk-dev] [PATCH v2 0/2] " Thomas Monjalon
-- strict thread matches above, loose matches on Subject: below --
2016-04-21 3:42 [dpdk-dev] [PATCH 0/6] fix i40e problematic dereference Helin Zhang
2016-06-26 15:46 ` [dpdk-dev] [PATCH v2 0/2] fix coverity issues Helin Zhang
2016-06-28 12:01 ` Bruce Richardson
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).