[dpdk-stable] patch 'cmdline: free on exit' has been queued to stable release 20.11.4
Xueming Li
xuemingl at nvidia.com
Wed Nov 10 07:30:58 CET 2021
Hi,
FYI, your patch has been queued to stable release 20.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 11/12/21. 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/steevenlee/dpdk
This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/f181839864ae7ba170519235a6da969a7df36a85
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001
From: Zhihong Peng <zhihongx.peng at intel.com>
Date: Mon, 18 Oct 2021 21:58:50 +0800
Subject: [PATCH] cmdline: free on exit
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
Malloc cl in the cmdline_stdin_new function, so release in the
cmdline_stdin_exit function is logical, so that cl will not be
released alone.
Fixes: af75078fece3 ("first public release")
Signed-off-by: Zhihong Peng <zhihongx.peng at intel.com>
Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
Tested-by: Zhihong Peng <zhihongx.peng at intel.com>
---
app/test/test.c | 1 -
app/test/test_cmdline_lib.c | 1 -
lib/librte_cmdline/cmdline_socket.c | 1 +
3 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/app/test/test.c b/app/test/test.c
index 864523ed61..f7d0946761 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -195,7 +195,6 @@ main(int argc, char **argv)
cmdline_interact(cl);
cmdline_stdin_exit(cl);
- cmdline_free(cl);
}
#endif
ret = 0;
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index d5a09b4541..6bcfa6511e 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
/* void functions */
cmdline_stdin_exit(NULL);
- cmdline_free(cl);
return 0;
error:
printf("Error: function accepted null parameter!\n");
diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
index 0fe1497008..f919537460 100644
--- a/lib/librte_cmdline/cmdline_socket.c
+++ b/lib/librte_cmdline/cmdline_socket.c
@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)
return;
terminal_restore(cl);
+ cmdline_free(cl);
}
--
2.33.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-11-10 14:17:09.660774437 +0800
+++ 0174-cmdline-free-on-exit.patch 2021-11-10 14:17:01.984078497 +0800
@@ -1 +1 @@
-From 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c Mon Sep 17 00:00:00 2001
+From f181839864ae7ba170519235a6da969a7df36a85 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 6ad06203a587a8ce10392d9224e9fbdcb77b3d5c ]
@@ -17,5 +20,4 @@
- app/test/test.c | 1 -
- app/test/test_cmdline_lib.c | 1 -
- doc/guides/rel_notes/release_21_11.rst | 3 +++
- lib/cmdline/cmdline_socket.c | 1 +
- 4 files changed, 4 insertions(+), 2 deletions(-)
+ app/test/test.c | 1 -
+ app/test/test_cmdline_lib.c | 1 -
+ lib/librte_cmdline/cmdline_socket.c | 1 +
+ 3 files changed, 1 insertion(+), 2 deletions(-)
@@ -24 +26 @@
-index 173d202e47..5194131026 100644
+index 864523ed61..f7d0946761 100644
@@ -27 +29 @@
-@@ -233,7 +233,6 @@ main(int argc, char **argv)
+@@ -195,7 +195,6 @@ main(int argc, char **argv)
@@ -36 +38 @@
-index 054ebf5e9d..f238094b07 100644
+index d5a09b4541..6bcfa6511e 100644
@@ -39 +41 @@
-@@ -180,7 +180,6 @@ test_cmdline_socket_fns(void)
+@@ -174,7 +174,6 @@ test_cmdline_socket_fns(void)
@@ -47,19 +49,5 @@
-diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst
-index 9b1843eb09..450bcbb445 100644
---- a/doc/guides/rel_notes/release_21_11.rst
-+++ b/doc/guides/rel_notes/release_21_11.rst
-@@ -325,6 +325,9 @@ API Changes
- removed. Its usages have been replaced by a new function
- ``rte_kvargs_get_with_value()``.
-
-+* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure.
-+ Calls to ``cmdline_free()`` after it need to be deleted from applications.
-+
- * cmdline: Made ``cmdline`` structure definition hidden on Linux and FreeBSD.
-
- * cmdline: Made ``rdline`` structure definition hidden. Functions are added
-diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c
-index 998e8ade25..ebd5343754 100644
---- a/lib/cmdline/cmdline_socket.c
-+++ b/lib/cmdline/cmdline_socket.c
-@@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl)
+diff --git a/lib/librte_cmdline/cmdline_socket.c b/lib/librte_cmdline/cmdline_socket.c
+index 0fe1497008..f919537460 100644
+--- a/lib/librte_cmdline/cmdline_socket.c
++++ b/lib/librte_cmdline/cmdline_socket.c
+@@ -57,4 +57,5 @@ cmdline_stdin_exit(struct cmdline *cl)
More information about the stable
mailing list