[dpdk-stable] patch 'kni: fix possible uninitialized variable' has been queued to LTS release 16.11.9
Luca Boccassi
bluca at debian.org
Mon Nov 26 13:49:13 CET 2018
Hi,
FYI, your patch has been queued to LTS release 16.11.9
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/28/18. 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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Luca Boccassi
---
>From f81caeb00aafc05e15ecd2178987bc9deafd5fe4 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Fri, 16 Nov 2018 17:58:51 +0100
Subject: [PATCH] kni: fix possible uninitialized variable
[ upstream commit a17842c1421c1b26f9deed4f6684abdba06e7a56 ]
This error can be raised:
lib/librte_kni/rte_kni.c:531:15: error:
'req' may be used uninitialized in this function
It should not happen because kni_fifo_get() would return 0 if
req is not initialized, so the function would return before using req.
But GCC complains about it in -O1 optimization,
and a NULL initialization is harmless here.
Fixes: 3fc5ca2f6352 ("kni: initial import")
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
lib/librte_kni/rte_kni.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index 0c6641bfa..12656a9d4 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -532,7 +532,7 @@ int
rte_kni_handle_request(struct rte_kni *kni)
{
unsigned ret;
- struct rte_kni_request *req;
+ struct rte_kni_request *req = NULL;
if (kni == NULL)
return -1;
--
2.19.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2018-11-26 12:45:13.650678684 +0000
+++ 0002-kni-fix-possible-uninitialized-variable.patch 2018-11-26 12:45:13.603202331 +0000
@@ -1,8 +1,10 @@
-From a17842c1421c1b26f9deed4f6684abdba06e7a56 Mon Sep 17 00:00:00 2001
+From f81caeb00aafc05e15ecd2178987bc9deafd5fe4 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Fri, 16 Nov 2018 17:58:51 +0100
Subject: [PATCH] kni: fix possible uninitialized variable
+[ upstream commit a17842c1421c1b26f9deed4f6684abdba06e7a56 ]
+
This error can be raised:
lib/librte_kni/rte_kni.c:531:15: error:
'req' may be used uninitialized in this function
@@ -13,7 +15,6 @@
and a NULL initialization is harmless here.
Fixes: 3fc5ca2f6352 ("kni: initial import")
-Cc: stable at dpdk.org
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
@@ -21,10 +22,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
-index c9726d4f8..73aeccccf 100644
+index 0c6641bfa..12656a9d4 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
-@@ -483,7 +483,7 @@ int
+@@ -532,7 +532,7 @@ int
rte_kni_handle_request(struct rte_kni *kni)
{
unsigned ret;
More information about the stable
mailing list