From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EFC7FA04DD for ; Wed, 28 Oct 2020 11:54:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E9F4F49E0; Wed, 28 Oct 2020 11:54:00 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by dpdk.org (Postfix) with ESMTP id 518F849E0 for ; Wed, 28 Oct 2020 11:53:58 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id d3so4308853wma.4 for ; Wed, 28 Oct 2020 03:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dG8O7yu+p0RAeJgBhzFN6i3FLkAjHeXKbgLsDR5v0BQ=; b=I9gtj9H8Q0sgQU4ssW68HdR6NN/1s3v7vyxLQBxm5rY3UmdD9QmcKyfe/s7s/ziDzR yPaxuwupNSC+b2H5+jL6Y2b2DnZ9dQJVfyd6CC9z0ka8vUyefmjj9J8/vJPcml13Vulr wokSP2j1xcy93ond78/gj1WFnczbdEdM5Z9Hy540SYbxqf7qarG/Is+yczRZjP3vNhy9 kfTkaNvLnuf4XVMhwgnjkX19OESG4mRa242h1+C5wTK2mcjKbAnPLHZz17GYQNCR07TR lwOFr1FwvUUJ14bak7u//nZsPA5YPlN3KQxY5YHk4YcQLs8bPix/N3DkmI2/17vlXVmW cF/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dG8O7yu+p0RAeJgBhzFN6i3FLkAjHeXKbgLsDR5v0BQ=; b=f1pP1JOOaBCXLedCwztUtmgORVez61bCt+Ui2Erwe91gZePGWj/UZRyJQB/N5+GPxq Ee4sZ5gfwlNScKaUlBwcGGSLsn+K8ypnF8avp7BwON5mDsnRJ2JH0W/RENmig3cNhlGw rtB3emsyIasLgGFsAMWE0gld6gRm/iqT914JRXG6ErXM4tUpq8WiKhqmZwe1IN7DAczN wen47cJp9ePZJMH6OhzfHDCp6Y8pdykce+/tmduIiR2oaYdBpmZgrA4Oox0qrtWcerHU hF9gGkNYdfRFAvJxAHNqzO+W9z7XsnQEmwvdLeNI3u/GzHxR5mhOfOeTz9XlYYhXI5vc Za8g== X-Gm-Message-State: AOAM532UfXfamQ+ZTM35iFp7+yO50NO+NTnhQJtlVK+mcvme+OUPyIy6 +CFVeYLmnMWHTCAUbfRgBZa1uRNzXka49ZQ8 X-Google-Smtp-Source: ABdhPJxLv+55n7O01NtzzP0T3RX4bTshSWYDmNj+lv3y5wrNV0rbwy79rpuvOunn11C8R3Jax3KgQA== X-Received: by 2002:a7b:cd8f:: with SMTP id y15mr7505502wmj.9.1603882438028; Wed, 28 Oct 2020 03:53:58 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 1sm6818701wre.61.2020.10.28.03.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:53:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Maxime Coquelin Cc: Nicolas Chautru , dpdk stable Date: Wed, 28 Oct 2020 10:45:05 +0000 Message-Id: <20201028104606.3504127-146-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'baseband/fpga_lte_fec: fix crash with debug' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Nicolas Chautru --- 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 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@dpdk.org Signed-off-by: Maxime Coquelin Acked-by: Nicolas Chautru @@ -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