[dpdk-stable] patch 'eventdev: fix possible use of uninitialized var' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:59:24 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/36050598d20a44fb9436a49ad558d398af71058b

Thanks.

Kevin.

---
>From 36050598d20a44fb9436a49ad558d398af71058b Mon Sep 17 00:00:00 2001
From: Andrzej Ostruszka <aostruszka at marvell.com>
Date: Thu, 7 Nov 2019 16:03:10 +0100
Subject: [PATCH] eventdev: fix possible use of uninitialized var
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 57e20572ac67a55874a206ef7339443b0950705d ]

Fix the logic for the case of event queue allowing all schedule types.

Compiler warning pointing to this error (with LTO enabled):
error: ‘sched_type’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
  if ((ret < 0 && ret != -EOVERFLOW) ||

Fixes: 6750b21bd6af ("eventdev: add default software timer adapter")

Signed-off-by: Andrzej Ostruszka <aostruszka at marvell.com>
Reviewed-by: Jerin Jacob <jerinj at marvell.com>
---
 lib/librte_eventdev/rte_event_timer_adapter.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c
index 026d639bc..7226fc624 100644
--- a/lib/librte_eventdev/rte_event_timer_adapter.c
+++ b/lib/librte_eventdev/rte_event_timer_adapter.c
@@ -685,9 +685,9 @@ check_destination_event_queue(struct rte_event_timer *evtim,
 				       &sched_type);
 
-	if ((ret < 0 && ret != -EOVERFLOW) ||
-	    evtim->ev.sched_type != sched_type)
-		return -1;
+	if ((ret == 0 && evtim->ev.sched_type == sched_type) ||
+	    ret == -EOVERFLOW)
+		return 0;
 
-	return 0;
+	return -1;
 }
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:42.395867983 +0000
+++ 0050-eventdev-fix-possible-use-of-uninitialized-var.patch	2019-12-10 14:49:39.083457189 +0000
@@ -1 +1 @@
-From 57e20572ac67a55874a206ef7339443b0950705d Mon Sep 17 00:00:00 2001
+From 36050598d20a44fb9436a49ad558d398af71058b Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 57e20572ac67a55874a206ef7339443b0950705d ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 5ce399eca..161e21a68 100644
+index 026d639bc..7226fc624 100644
@@ -29 +30 @@
-@@ -707,9 +707,9 @@ check_destination_event_queue(struct rte_event_timer *evtim,
+@@ -685,9 +685,9 @@ check_destination_event_queue(struct rte_event_timer *evtim,



More information about the stable mailing list