From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 9D4651B108 for ; Wed, 21 Nov 2018 17:50:23 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08093308402A; Wed, 21 Nov 2018 16:50:23 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3A385C21E; Wed, 21 Nov 2018 16:50:21 +0000 (UTC) From: Kevin Traynor To: Somnath Kotur Cc: Ajit Khaparde , dpdk stable Date: Wed, 21 Nov 2018 16:47:48 +0000 Message-Id: <20181121164828.32249-34-ktraynor@redhat.com> In-Reply-To: <20181121164828.32249-1-ktraynor@redhat.com> References: <20181121164828.32249-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 21 Nov 2018 16:50:23 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnxt: fix uninitialized pointer access in Tx' has been queued to stable release 18.08.1 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: , X-List-Received-Date: Wed, 21 Nov 2018 16:50:24 -0000 Hi, FYI, your patch has been queued to stable release 18.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/27/18. 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. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Kevin Traynor --- >>From 4f7600064faebb6ac09a8b6d1ca1e6a731be83d2 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Fri, 28 Sep 2018 18:59:53 -0700 Subject: [PATCH] net/bnxt: fix uninitialized pointer access in Tx [ upstream commit 63d086a52f0120523f3a33878d3ca0072b2de879 ] bnxt_start_xmit() was attempting to access an uninitialized ptr - txbd1 which would lead to segmentation fault. Fix to initialize ptr to NULL and check for the same before access. Fixes: f10258e39ec2 ("net/bnxt: fix HW Tx checksum offload check") Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_txr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 67bb35e06..39be7bdfa 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -121,5 +121,5 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, struct bnxt_tx_ring_info *txr = txq->tx_ring; struct tx_bd_long *txbd; - struct tx_bd_long_hi *txbd1; + struct tx_bd_long_hi *txbd1 = NULL; uint32_t vlan_tag_flags, cfa_action; bool long_bd = false; @@ -296,5 +296,6 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, txbd->flags_type |= TX_BD_LONG_FLAGS_PACKET_END; - txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags); + if (txbd1) + txbd1->lflags = rte_cpu_to_le_32(txbd1->lflags); txr->tx_prod = RING_NEXT(txr->tx_ring_struct, txr->tx_prod); -- 2.19.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-11-21 16:44:31.889828591 +0000 +++ 0034-net-bnxt-fix-uninitialized-pointer-access-in-Tx.patch 2018-11-21 16:44:30.000000000 +0000 @@ -1,14 +1,15 @@ -From 63d086a52f0120523f3a33878d3ca0072b2de879 Mon Sep 17 00:00:00 2001 +From 4f7600064faebb6ac09a8b6d1ca1e6a731be83d2 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Fri, 28 Sep 2018 18:59:53 -0700 Subject: [PATCH] net/bnxt: fix uninitialized pointer access in Tx +[ upstream commit 63d086a52f0120523f3a33878d3ca0072b2de879 ] + bnxt_start_xmit() was attempting to access an uninitialized ptr - txbd1 which would lead to segmentation fault. Fix to initialize ptr to NULL and check for the same before access. Fixes: f10258e39ec2 ("net/bnxt: fix HW Tx checksum offload check") -Cc: stable@dpdk.org Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde