From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2 11/15] net/bnxt: fix a potential null poiner dereference
Date: Tue, 24 Oct 2017 16:19:49 -0500 [thread overview]
Message-ID: <20171024211953.12021-12-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <20171024211953.12021-1-ajit.khaparde@broadcom.com>
Fixes: f7ecea911ec5 ("net/bnxt: fix interrupt handler")
Coverity issue: 195046
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_irq.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c
index 79a119623..49436cfd9 100644
--- a/drivers/net/bnxt/bnxt_irq.c
+++ b/drivers/net/bnxt/bnxt_irq.c
@@ -50,10 +50,14 @@ static void bnxt_int_handler(void *param)
struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
struct bnxt_cp_ring_info *cpr = bp->def_cp_ring;
- uint32_t raw_cons = cpr->cp_raw_cons;
- uint32_t cons;
struct cmpl_base *cmp;
+ uint32_t raw_cons;
+ uint32_t cons;
+
+ if (cpr == NULL)
+ return;
+ raw_cons = cpr->cp_raw_cons;
while (1) {
if (!cpr || !cpr->cp_ring_struct)
return;
--
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 ` Ajit Khaparde [this message]
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 ` [dpdk-dev] [PATCH v2 13/15] net/bnxt: fix a pointer deref before null check Ajit Khaparde
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-12-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).