[dpdk-stable] patch 'net/nfp: fix dangling pointer on probe failure' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:03:08 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/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 46825a9e5926f2034af399a71a7260a1b496b9b0 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Tue, 7 Apr 2020 19:37:27 +0800
Subject: [PATCH] net/nfp: fix dangling pointer on probe failure

[ upstream commit 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 ]

When nfp_pf_create_dev() is cleaning up, it does not correctly set
the dev_private variable to NULL, which will lead to a double free.

Fixes: ef28aa96e53b ("net/nfp: support multiprocess")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Heinrich Kuhn <heinrich.kuhn at netronome.com>
---
 drivers/net/nfp/nfp_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index afcf072339..b6ff5ecd7d 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -3451,9 +3451,10 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,
 probe_failed:
 	rte_free(port_name);
 	/* free ports private data if primary process */
-	if (rte_eal_process_type() == RTE_PROC_PRIMARY)
+	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
 		rte_free(eth_dev->data->dev_private);
-
+		eth_dev->data->dev_private = NULL;
+	}
 	rte_eth_dev_release_port(eth_dev);
 
 	return retval;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.671499911 +0100
+++ 0053-net-nfp-fix-dangling-pointer-on-probe-failure.patch	2020-05-19 14:04:44.192647937 +0100
@@ -1,13 +1,14 @@
-From 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 Mon Sep 17 00:00:00 2001
+From 46825a9e5926f2034af399a71a7260a1b496b9b0 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Tue, 7 Apr 2020 19:37:27 +0800
 Subject: [PATCH] net/nfp: fix dangling pointer on probe failure
 
+[ upstream commit 9d5996c01de06fd0c03bc74d58c44f8c29fe7a97 ]
+
 When nfp_pf_create_dev() is cleaning up, it does not correctly set
 the dev_private variable to NULL, which will lead to a double free.
 
 Fixes: ef28aa96e53b ("net/nfp: support multiprocess")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Acked-by: Heinrich Kuhn <heinrich.kuhn at netronome.com>
@@ -16,7 +17,7 @@
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
-index bce4d96468..2460ee1992 100644
+index afcf072339..b6ff5ecd7d 100644
 --- a/drivers/net/nfp/nfp_net.c
 +++ b/drivers/net/nfp/nfp_net.c
 @@ -3451,9 +3451,10 @@ nfp_pf_create_dev(struct rte_pci_device *dev, int port, int ports,


More information about the stable mailing list