From 1c38061e790fc3f28d77eb7ded6cb8601c7c6692 Mon Sep 17 00:00:00 2001 From: Xiao Zhang Date: Tue, 6 Aug 2019 07:20:54 +0800 Subject: [PATCH] net/fm10k: fix address of first segment 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: 343416 Fixes: fe65e1e1ce61 ("fm10k: add vector scatter Rx") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang Acked-by: Xiaolong Ye --- drivers/net/fm10k/fm10k_rxtx_vec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c index 788e2484a2..45542bef30 100644 --- a/drivers/net/fm10k/fm10k_rxtx_vec.c +++ b/drivers/net/fm10k/fm10k_rxtx_vec.c @@ -678,6 +678,7 @@ fm10k_recv_scattered_pkts_vec(void *rx_queue, i++; if (i == nb_bufs) return nb_bufs; + rxq->pkt_first_seg = rx_pkts[i]; } return i + fm10k_reassemble_packets(rxq, &rx_pkts[i], nb_bufs - i, &split_flags[i]); -- 2.20.1