From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2 13/15] net/bnxt: fix a pointer deref before null check
Date: Tue, 24 Oct 2017 16:19:51 -0500 [thread overview]
Message-ID: <20171024211953.12021-14-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20171024211953.12021-1-ajit.khaparde@broadcom.com>
Coverity issue: 158634
Fixes: daef48efe5e5 ("net/bnxt: support set MTU")
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_rxr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index d9621e593..d68d26f17 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -437,11 +437,11 @@ static int bnxt_rx_pkt(struct rte_mbuf **rx_pkt,
cons = rxcmp->opaque;
mbuf = bnxt_consume_rx_buf(rxr, cons);
- rte_prefetch0(mbuf);
-
if (mbuf == NULL)
return -EBUSY;
+ rte_prefetch0(mbuf);
+
mbuf->nb_segs = 1;
mbuf->next = NULL;
mbuf->pkt_len = rxcmp->len;
--
2.13.5 (Apple Git-94)
next prev parent reply other threads:[~2017-10-24 21:20 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 17:35 [dpdk-dev] [PATCH 0/3] patchset for bnxt PMD Ajit Khaparde
2017-10-12 17:35 ` [dpdk-dev] [PATCH 1/3] net/bnxt: handle Rx multi queue creation properly Ajit Khaparde
2017-10-12 17:35 ` [dpdk-dev] [PATCH 2/3] net/bnxt: remove redundant code parsing pool_map Ajit Khaparde
2017-10-12 17:35 ` [dpdk-dev] [PATCH 3/3] net/bnxt: update HWRM API to 1.8.2 Ajit Khaparde
2017-10-20 19:28 ` Ferruh Yigit
2017-10-20 19:39 ` Ferruh Yigit
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 00/15] bnxt patchset Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 01/15] net/bnxt: update HWRM to 1.8.2 Ajit Khaparde
2017-10-24 22:50 ` Ferruh Yigit
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 02/15] net/bnxt: fix tx_offload capability Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 03/15] net/bnxt: fix rx_offload capability Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 04/15] net/bnxt: handle Rx multi queue creation properly Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 05/15] net/bnxt: remove redundant code parsing pool_map Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 06/15] net/bnxt: fix redirecting traffic to a VF Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 07/15] net/bnxt: fix a bad bit shift operation Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 08/15] net/bnxt: fix a null pointer dereference Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 09/15] net/bnxt: fix an issue reported by Coverity Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 10/15] net/bnxt: fix a potential null pointer dereference Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 11/15] net/bnxt: fix a potential null poiner dereference Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 12/15] net/bnxt: fix a null pointer deref Ajit Khaparde
2017-10-24 21:19 ` Ajit Khaparde [this message]
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 14/15] net/bnxt: fix an issue reported by Coverity Ajit Khaparde
2017-10-24 21:19 ` [dpdk-dev] [PATCH v2 15/15] net/bnxt: check VLANs from pool_map only for VMDQ Ajit Khaparde
2017-10-24 22:49 ` [dpdk-dev] [PATCH v2 00/15] bnxt patchset Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171024211953.12021-14-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).