summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Zhang <xiao.zhang@intel.com>2019-08-06 07:20:54 +0800
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit9736817beffbbeb9322e93bb37b97d95f5d55d8c (patch)
tree646e86e60f6e039056354835316316cdd73c8c97
parent0416d451f398895dd6a4ae84a4674e2a16608472 (diff)
downloaddpdk-stable-9736817beffbbeb9322e93bb37b97d95f5d55d8c.zip
dpdk-stable-9736817beffbbeb9322e93bb37b97d95f5d55d8c.tar.gz
dpdk-stable-9736817beffbbeb9322e93bb37b97d95f5d55d8c.tar.xz
net/fm10k: fix address of first segment
[ upstream commit 1c38061e790fc3f28d77eb7ded6cb8601c7c6692 ] 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") Signed-off-by: Xiao Zhang <xiao.zhang@intel.com> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
-rw-r--r--drivers/net/fm10k/fm10k_rxtx_vec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/fm10k/fm10k_rxtx_vec.c b/drivers/net/fm10k/fm10k_rxtx_vec.c
index 788e248..45542be 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]);