[dpdk-stable] patch 'event/dpaa2: fix dereference before null check' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Wed Nov 18 17:34:50 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/24/20. 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/09979638d692146300b1626c39142506c56cc2a0

Thanks.

Kevin.

---
>From 09979638d692146300b1626c39142506c56cc2a0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Wed, 26 Aug 2020 21:07:40 +0800
Subject: [PATCH] event/dpaa2: fix dereference before null check

[ upstream commit db5e0e7aea5e256c43489a3b272a4318b6ddca9f ]

Coverity flags that 'portal' variable is used before
it's checked for NULL. This patch fixes this issue.

Coverity issue: 323516
Fixes: 4ab57b042e7c ("event/dpaa2: affine portal at runtime during I/O")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Nipun Gupta <nipun.gupta at nxp.com>
---
 drivers/event/dpaa2/dpaa2_eventdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
index f647430b26..1cf9e659e3 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -554,12 +554,12 @@ dpaa2_eventdev_port_release(void *port)
 	EVENTDEV_INIT_FUNC_TRACE();
 
+	if (portal == NULL)
+		return;
+
 	/* TODO: Cleanup is required when ports are in linked state. */
 	if (portal->is_port_linked)
 		DPAA2_EVENTDEV_WARN("Event port must be unlinked before release");
 
-	if (portal)
-		rte_free(portal);
-
-	portal = NULL;
+	rte_free(portal);
 }
 
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-18 16:33:38.071515697 +0000
+++ 0004-event-dpaa2-fix-dereference-before-null-check.patch	2020-11-18 16:33:37.898215042 +0000
@@ -1 +1 @@
-From db5e0e7aea5e256c43489a3b272a4318b6ddca9f Mon Sep 17 00:00:00 2001
+From 09979638d692146300b1626c39142506c56cc2a0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit db5e0e7aea5e256c43489a3b272a4318b6ddca9f ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 3ae4441ee3..f7383ca738 100644
+index f647430b26..1cf9e659e3 100644
@@ -23 +24 @@
-@@ -570,12 +570,12 @@ dpaa2_eventdev_port_release(void *port)
+@@ -554,12 +554,12 @@ dpaa2_eventdev_port_release(void *port)



More information about the stable mailing list