[dpdk-dev] [PATCH v2 4/5] net/iavf: fix dereference after null check coverity

Xiao Zhang xiao.zhang at intel.com
Tue Aug 6 01:20:53 CEST 2019


This patch fixes (dereference after null check) coverity issue.
The address of first segmented packets was not set correctly during
reassembling packets which led to this issue.

Coverity issue: 343447
Fixes: 319c421f ("net/avf: enable SSE Rx Tx")
Cc: stable at dpdk.org

Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
---
 drivers/net/iavf/iavf_rxtx_vec_sse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_rxtx_vec_sse.c b/drivers/net/iavf/iavf_rxtx_vec_sse.c
index 3d98514..cc71f23 100644
--- a/drivers/net/iavf/iavf_rxtx_vec_sse.c
+++ b/drivers/net/iavf/iavf_rxtx_vec_sse.c
@@ -521,6 +521,7 @@ iavf_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 			i++;
 		if (i == nb_bufs)
 			return nb_bufs;
+		rxq->pkt_first_seg = rx_pkts[i];
 	}
 	return i + reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i,
 		&split_flags[i]);
-- 
2.7.4



More information about the dev mailing list