From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id AB83A201 for ; Mon, 15 Oct 2018 13:52:16 +0200 (CEST) Received: by mail-wm1-f65.google.com with SMTP id 185-v6so19387499wmt.2 for ; Mon, 15 Oct 2018 04:52:16 -0700 (PDT) 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=0L21fUihPWs8Vpye8NJtFfMvP/ER0X8roz5rluBNpq8=; b=NHcwwYfavY7T5SAs/lVPS0ZlAuYDhOgsDJept0kf8zX1DmHR+2LbbMNojKA/ChDzeF Xo3B99t0D1tSlvGT0fJm082SVoUm+ZVIxEh5ikbs9cvJY+oMWlzEwmZiWn4oQLyA7fGr DgX9PF/bPNYGg6ygIX99+F9AvqE6GYQ3ObdhiH8FnmYHsFa5T5/ORh3WU406VIhuRwtA Y7TJOOkugURo07iaMfegFQMHF8/ZKILsPQBbo0khhLTmyFBHbPTgrHzo9bS7pR+OEg2p YukANqSYyrTkSI5eWr3nDnq+UB26koeXeY6SLz2RWWnVPqvgTqnZUnxAcKVOSMOR6zjH jgCA== X-Gm-Message-State: ABuFfoh89wQAGs2rXeqLj7V6qSaKzeUEi064oR31wUnC7BEFUMz8O8o0 XDfEcoylUplecH5NDRkDgho= X-Google-Smtp-Source: ACcGV62ppDuVphMgje8r6wpx6A9R6wdmDX0KCNwxhR8RuGxXQuNwkQ1au7hKOmLNx2cVCFdJFoSLFA== X-Received: by 2002:a1c:e5cf:: with SMTP id c198-v6mr12982778wmh.113.1539604336272; Mon, 15 Oct 2018 04:52:16 -0700 (PDT) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id h64-v6sm7791598wmh.27.2018.10.15.04.52.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 15 Oct 2018 04:52:15 -0700 (PDT) From: Luca Boccassi To: Somnath Kotur Cc: Ajit Khaparde , dpdk stable Date: Mon, 15 Oct 2018 12:51:34 +0100 Message-Id: <20181015115144.27626-14-bluca@debian.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181015115144.27626-1-bluca@debian.org> References: <20181003162121.16364-1-bluca@debian.org> <20181015115144.27626-1-bluca@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix uninitialized pointer access in Tx' has been queued to LTS release 16.11.9 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: Mon, 15 Oct 2018 11:52:16 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.9 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/17/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. Luca Boccassi --- >>From 921f95806c08955aaee433f9e7aaa85b6847193d 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 ff24e23238..f1e1616bca 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -146,7 +146,7 @@ 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; uint16_t last_prod = 0; @@ -313,7 +313,8 @@ 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.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2018-10-15 12:48:34.979601163 +0100 +++ 0014-net-bnxt-fix-uninitialized-pointer-access-in-Tx.patch 2018-10-15 12:48:34.577096017 +0100 @@ -1,14 +1,15 @@ -From 63d086a52f0120523f3a33878d3ca0072b2de879 Mon Sep 17 00:00:00 2001 +From 921f95806c08955aaee433f9e7aaa85b6847193d 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 @@ -17,10 +18,10 @@ 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c -index 67bb35e06d..39be7bdfad 100644 +index ff24e23238..f1e1616bca 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c -@@ -120,7 +120,7 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, +@@ -146,7 +146,7 @@ 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; @@ -29,7 +30,7 @@ uint32_t vlan_tag_flags, cfa_action; bool long_bd = false; uint16_t last_prod = 0; -@@ -295,7 +295,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, +@@ -313,7 +313,8 @@ static uint16_t bnxt_start_xmit(struct rte_mbuf *tx_pkt, } txbd->flags_type |= TX_BD_LONG_FLAGS_PACKET_END;