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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:16 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.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 10/30/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.

Thanks.

Luca Boccassi

---
>From ace6739983f23a71f7a61757544413fcd19b3e6d 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 ede7b01618..5ae76d4d9d 100644
--- a/drivers/event/dpaa2/dpaa2_eventdev.c
+++ b/drivers/event/dpaa2/dpaa2_eventdev.c
@@ -567,14 +567,14 @@ 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);
 }
 
 static int
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.609168481 +0000
+++ 0157-event-dpaa2-fix-dereference-before-null-check.patch	2020-10-28 10:35:11.752833674 +0000
@@ -1,14 +1,15 @@
-From db5e0e7aea5e256c43489a3b272a4318b6ddca9f Mon Sep 17 00:00:00 2001
+From ace6739983f23a71f7a61757544413fcd19b3e6d 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")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Acked-by: Nipun Gupta <nipun.gupta at nxp.com>
@@ -17,10 +18,10 @@
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c
-index 3ae4441ee3..f7383ca738 100644
+index ede7b01618..5ae76d4d9d 100644
 --- a/drivers/event/dpaa2/dpaa2_eventdev.c
 +++ b/drivers/event/dpaa2/dpaa2_eventdev.c
-@@ -569,14 +569,14 @@ dpaa2_eventdev_port_release(void *port)
+@@ -567,14 +567,14 @@ dpaa2_eventdev_port_release(void *port)
  
  	EVENTDEV_INIT_FUNC_TRACE();
  


More information about the stable mailing list