From: Yongseok Koh <yskoh@mellanox.com>
To: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Cc: Jasvinder Singh <jasvinder.singh@intel.com>,
dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' has been queued to LTS release 17.11.4
Date: Thu, 26 Jul 2018 19:31:05 -0700 [thread overview]
Message-ID: <20180727023108.38699-7-yskoh@mellanox.com> (raw)
In-Reply-To: <20180727023108.38699-1-yskoh@mellanox.com>
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From fd417e1a22343c69844cc70417e7a6e3cf6228c4 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Date: Thu, 5 Jul 2018 11:15:46 +0530
Subject: [PATCH] app/testpmd: fix buffer leak in TM command
[ upstream commit b23ee8f2ac5de4a52573f844ba3c4f3261c3f7e7 ]
Free the buffer allocated for shared_shaper_id array in
case of configuration without shared shapers.
Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")
Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
app/test-pmd/cmdline_tm.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 803fae444..d40a427d8 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -1624,10 +1624,12 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
np.shaper_profile_id = res->shaper_profile_id;
np.n_shared_shapers = n_shared_shapers;
- if (np.n_shared_shapers)
+ if (np.n_shared_shapers) {
np.shared_shaper_id = &shared_shaper_id[0];
- else
- np.shared_shaper_id = NULL;
+ } else {
+ free(shared_shaper_id);
+ shared_shaper_id = NULL;
+ }
np.nonleaf.n_sp_priorities = res->n_sp_priorities;
np.stats_mask = res->stats_mask;
@@ -1779,10 +1781,12 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
np.shaper_profile_id = res->shaper_profile_id;
np.n_shared_shapers = n_shared_shapers;
- if (np.n_shared_shapers)
+ if (np.n_shared_shapers) {
np.shared_shaper_id = &shared_shaper_id[0];
- else
- np.shared_shaper_id = NULL;
+ } else {
+ free(shared_shaper_id);
+ shared_shaper_id = NULL;
+ }
np.leaf.cman = res->cman_mode;
np.leaf.wred.wred_profile_id = res->wred_profile_id;
--
2.11.0
next prev parent reply other threads:[~2018-07-27 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Yongseok Koh
2018-07-27 2:31 ` Yongseok Koh [this message]
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Yongseok Koh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180727023108.38699-7-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=jasvinder.singh@intel.com \
--cc=nithin.dabilpuram@caviumnetworks.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).