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 01CEDA046B for ; Tue, 23 Jul 2019 03:03:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EBB141BFA1; Tue, 23 Jul 2019 03:03:55 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id EB7501BFE0 for ; Tue, 23 Jul 2019 03:03:54 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Jul 2019 04:03:54 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6N11HgE026580; Tue, 23 Jul 2019 04:03:52 +0300 From: Yongseok Koh To: Bruce Richardson Cc: Rami Rosen , dpdk stable Date: Mon, 22 Jul 2019 18:00:55 -0700 Message-Id: <20190723010115.6446-88-yskoh@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190723010115.6446-1-yskoh@mellanox.com> References: <20190723010115.6446-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix dereference before null check in mbuf release' has been queued to LTS release 17.11.7 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 LTS release 17.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 07/27/19. So please shout if anyone has objection. 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. Yongseok --- >From cf47880d5c627576d2565aae5cc6bf7ee416de4b Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 8 Apr 2019 10:46:38 +0100 Subject: [PATCH] net/i40e: fix dereference before null check in mbuf release [ upstream commit 3f1b8bf9139ab94aa5ba1334499c3928ec630359 ] Coverity flags that the txq variable is used before it's checked for NULL. Also fix typo in error message. Coverity issue: 195023 Fixes: 24853544c84c ("net/i40e: fix mbuf free in vector Tx") Signed-off-by: Bruce Richardson Acked-by: Rami Rosen --- drivers/net/i40e/i40e_rxtx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 1725be66ef..44a730181c 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2309,13 +2309,13 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq) struct rte_eth_dev *dev; uint16_t i; - dev = &rte_eth_devices[txq->port_id]; - if (!txq || !txq->sw_ring) { - PMD_DRV_LOG(DEBUG, "Pointer to rxq or sw_ring is NULL"); + PMD_DRV_LOG(DEBUG, "Pointer to txq or sw_ring is NULL"); return; } + dev = &rte_eth_devices[txq->port_id]; + /** * vPMD tx will not set sw_ring's mbuf to NULL after free, * so need to free remains more carefully. -- 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-07-22 17:55:11.219516162 -0700 +++ 0088-net-i40e-fix-dereference-before-null-check-in-mbuf-r.patch 2019-07-22 17:55:06.418474000 -0700 @@ -1,14 +1,15 @@ -From 3f1b8bf9139ab94aa5ba1334499c3928ec630359 Mon Sep 17 00:00:00 2001 +From cf47880d5c627576d2565aae5cc6bf7ee416de4b Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 8 Apr 2019 10:46:38 +0100 Subject: [PATCH] net/i40e: fix dereference before null check in mbuf release +[ upstream commit 3f1b8bf9139ab94aa5ba1334499c3928ec630359 ] + Coverity flags that the txq variable is used before it's checked for NULL. Also fix typo in error message. Coverity issue: 195023 Fixes: 24853544c84c ("net/i40e: fix mbuf free in vector Tx") -Cc: stable@dpdk.org Signed-off-by: Bruce Richardson Acked-by: Rami Rosen @@ -17,10 +18,10 @@ 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c -index 58ed8145db..1489552da4 100644 +index 1725be66ef..44a730181c 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c -@@ -2423,13 +2423,13 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq) +@@ -2309,13 +2309,13 @@ i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq) struct rte_eth_dev *dev; uint16_t i;