git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faabf47
)
net/bnxt: fix a pointer deref before null check
author
Ajit Khaparde
<ajit.khaparde@broadcom.com>
Tue, 24 Oct 2017 21:19:51 +0000
(16:19 -0500)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Thu, 26 Oct 2017 00:33:01 +0000
(
02:33
+0200)
Coverity issue: 158634
Fixes:
daef48efe5e5
("net/bnxt: support set MTU")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxr.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnxt/bnxt_rxr.c
b/drivers/net/bnxt/bnxt_rxr.c
index
d9621e5
..
d68d26f
100644
(file)
--- 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;