[dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:45:05 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 b13e19d34bdfc86687b6cb80ae002f9134d89106 Mon Sep 17 00:00:00 2001
From: Maxime Coquelin <maxime.coquelin at redhat.com>
Date: Tue, 6 Oct 2020 12:04:21 +0200
Subject: [PATCH] baseband/fpga_lte_fec: fix crash with debug

[ upstream commit 755fb0887ff1283c2eaac6090bf46a4f4aa363dd ]

When RTE_LIBRTE_BBDEV_DEBUG is enabled, rte_device's driver
pointer is dereferenced twice in fpga_lte_fec's probe callback.
It causes a segmentation fault because this pointer is only
assigned after probe callback call.

This patch makes use of rte_pci_driver pointer instead

Fixes: efd453698c49 ("baseband/fpga_lte_fec: add driver for FEC on FPGA")

Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Nicolas Chautru <nicolas.chautru at intel.com>
---
 drivers/baseband/fpga_lte_fec/fpga_lte_fec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
index 8bd10b401a..0a75a0ff13 100644
--- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
+++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
@@ -2325,7 +2325,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
 
 	rte_bbdev_log_debug(
 			"Init device %s [%s] @ virtaddr %p phyaddr %#"PRIx64,
-			dev->device->driver->name, dev->data->name,
+			drv->driver.name, dev->data->name,
 			(void *)pci_dev->mem_resource[0].addr,
 			pci_dev->mem_resource[0].phys_addr);
 }
@@ -2380,7 +2380,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
 		((uint16_t)(version_id >> 16)), ((uint16_t)version_id));
 
 #ifdef RTE_LIBRTE_BBDEV_DEBUG
-	if (!strcmp(bbdev->device->driver->name,
+	if (!strcmp(pci_drv->driver.name,
 			RTE_STR(FPGA_LTE_FEC_PF_DRIVER_NAME)))
 		print_static_reg_debug_info(d->mmio_base);
 #endif
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:16.270812301 +0000
+++ 0146-baseband-fpga_lte_fec-fix-crash-with-debug.patch	2020-10-28 10:35:11.728833321 +0000
@@ -1,8 +1,10 @@
-From 755fb0887ff1283c2eaac6090bf46a4f4aa363dd Mon Sep 17 00:00:00 2001
+From b13e19d34bdfc86687b6cb80ae002f9134d89106 Mon Sep 17 00:00:00 2001
 From: Maxime Coquelin <maxime.coquelin at redhat.com>
 Date: Tue, 6 Oct 2020 12:04:21 +0200
 Subject: [PATCH] baseband/fpga_lte_fec: fix crash with debug
 
+[ upstream commit 755fb0887ff1283c2eaac6090bf46a4f4aa363dd ]
+
 When RTE_LIBRTE_BBDEV_DEBUG is enabled, rte_device's driver
 pointer is dereferenced twice in fpga_lte_fec's probe callback.
 It causes a segmentation fault because this pointer is only
@@ -11,7 +13,6 @@
 This patch makes use of rte_pci_driver pointer instead
 
 Fixes: efd453698c49 ("baseband/fpga_lte_fec: add driver for FEC on FPGA")
-Cc: stable at dpdk.org
 
 Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
 Acked-by: Nicolas Chautru <nicolas.chautru at intel.com>
@@ -20,10 +21,10 @@
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
-index 71de399eef..a0fb11cb47 100644
+index 8bd10b401a..0a75a0ff13 100644
 --- a/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
 +++ b/drivers/baseband/fpga_lte_fec/fpga_lte_fec.c
-@@ -2328,7 +2328,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
+@@ -2325,7 +2325,7 @@ fpga_lte_fec_init(struct rte_bbdev *dev, struct rte_pci_driver *drv)
  
  	rte_bbdev_log_debug(
  			"Init device %s [%s] @ virtaddr %p phyaddr %#"PRIx64,
@@ -32,7 +33,7 @@
  			(void *)pci_dev->mem_resource[0].addr,
  			pci_dev->mem_resource[0].phys_addr);
  }
-@@ -2383,7 +2383,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
+@@ -2380,7 +2380,7 @@ fpga_lte_fec_probe(struct rte_pci_driver *pci_drv,
  		((uint16_t)(version_id >> 16)), ((uint16_t)version_id));
  
  #ifdef RTE_LIBRTE_BBDEV_DEBUG


More information about the stable mailing list