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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:04:47 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 ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001
From: Yunjian Wang <wangyunjian at huawei.com>
Date: Tue, 7 Apr 2020 19:35:43 +0800
Subject: [PATCH] net/octeontx: fix dangling pointer on init failure

[ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ]

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

Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")

Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Acked-by: Harman Kalra <hkalra at marvell.com>
---
 drivers/net/octeontx/octeontx_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 1d022e79a0..e85acdde0a 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
 
 free_mac_addrs:
 	rte_free(data->mac_addrs);
+	data->mac_addrs = NULL;
 err:
 	if (nic)
 		octeontx_port_close(nic);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:50.639435754 +0100
+++ 0152-net-octeontx-fix-dangling-pointer-on-init-failure.patch	2020-05-19 14:04:44.480653158 +0100
@@ -1,13 +1,14 @@
-From 5ed5df8073c80d1af9ec8c89a8b2a5299463058d Mon Sep 17 00:00:00 2001
+From ea6b087b9b8b40c7aa6f4ac50ff28fb75f364941 Mon Sep 17 00:00:00 2001
 From: Yunjian Wang <wangyunjian at huawei.com>
 Date: Tue, 7 Apr 2020 19:35:43 +0800
 Subject: [PATCH] net/octeontx: fix dangling pointer on init failure
 
+[ upstream commit 5ed5df8073c80d1af9ec8c89a8b2a5299463058d ]
+
 When octeontx_create() is cleaning up, it does not correctly set
 the mac_addrs variable to NULL, which will lead to a double free.
 
 Fixes: 9e399b88ce2f ("net/octeontx: fix memory leak of MAC address table")
-Cc: stable at dpdk.org
 
 Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
 Acked-by: Harman Kalra <hkalra at marvell.com>
@@ -16,10 +17,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
-index ea3b278a15..d5371ae07d 100644
+index 1d022e79a0..e85acdde0a 100644
 --- a/drivers/net/octeontx/octeontx_ethdev.c
 +++ b/drivers/net/octeontx/octeontx_ethdev.c
-@@ -1454,6 +1454,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
+@@ -1124,6 +1124,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
  
  free_mac_addrs:
  	rte_free(data->mac_addrs);


More information about the stable mailing list