diff mbox series

[1/2] net/i40e: fix address of first segment

Message ID 1569304125-5365-2-git-send-email-joyce.kong@arm.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series drivers/net: fix address of first segment | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Joyce Kong Sept. 24, 2019, 5:48 a.m. UTC
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: 343422, 343403
Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector driver")
Cc: stable@dpdk.org

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
---
 drivers/net/i40e/i40e_rxtx_vec_neon.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Xiao Zhang Sept. 24, 2019, 6:47 a.m. UTC | #1
> -----Original Message-----
> From: Joyce Kong [mailto:joyce.kong@arm.com]
> Sent: Tuesday, September 24, 2019 1:49 PM
> To: dev@dpdk.org
> Cc: nd@arm.com; thomas@monjalon.net; jerinj@marvell.com; Zhang, Xiao
> <xiao.zhang@intel.com>; gavin.hu@arm.com; honnappa.nagarahalli@arm.com;
> stable@dpdk.org
> Subject: [PATCH 1/2] net/i40e: 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: 343422, 343403
> Fixes: ca74903b75cf ("net/i40e: extract non-x86 specific code from vector
> driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> ---
>  drivers/net/i40e/i40e_rxtx_vec_neon.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c
> b/drivers/net/i40e/i40e_rxtx_vec_neon.c
> index 864eb9a..deb185f 100644
> --- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
> +++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
> @@ -474,6 +474,7 @@ i40e_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

Reviewed-by: Xiao Zhang <xiao.zhang@intel.com>
diff mbox series

Patch

diff --git a/drivers/net/i40e/i40e_rxtx_vec_neon.c b/drivers/net/i40e/i40e_rxtx_vec_neon.c
index 864eb9a..deb185f 100644
--- a/drivers/net/i40e/i40e_rxtx_vec_neon.c
+++ b/drivers/net/i40e/i40e_rxtx_vec_neon.c
@@ -474,6 +474,7 @@  i40e_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]);