From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id EE6FAA0613 for ; Sun, 4 Aug 2019 14:06:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92E0C1BEC7; Sun, 4 Aug 2019 14:06:06 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 21D491BEA0; Sun, 4 Aug 2019 14:06:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Aug 2019 05:06:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,345,1559545200"; d="scan'208";a="372814550" Received: from npg-dpdk-zhangxiao.sh.intel.com ([10.67.110.190]) by fmsmga005.fm.intel.com with ESMTP; 04 Aug 2019 05:06:02 -0700 From: Xiao Zhang To: dev@dpdk.org Cc: beilei.xing@intel.com, qiming.yang@intel.com, Xiao Zhang , stable@dpdk.org Date: Mon, 5 Aug 2019 05:00:28 +0800 Message-Id: <1564952430-6585-3-git-send-email-xiao.zhang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1564952430-6585-1-git-send-email-xiao.zhang@intel.com> References: <1564952430-6585-1-git-send-email-xiao.zhang@intel.com> Subject: [dpdk-dev] [PATCH 3/5] net/i40e: fix dereference after null check coverity X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The address of receive queue start segment was not updated when found by iterated checking, update the address to fix coverity issue. Coverity issue: 343422 Coverity issue: 343403 Fixes: ca74903b ("net/i40e: extract non-x86 specific code from vector driver") Cc: stable@dpdk.org Signed-off-by: Xiao Zhang --- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 1 + drivers/net/i40e/i40e_rxtx_vec_sse.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index c4dc990..0cbb2c2 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -588,6 +588,7 @@ i40e_recv_scattered_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, /* find the first split flag, and only reassemble then*/ while (i < nb_bufs && !split_flags[i]) i++; + rxq->pkt_first_seg = rx_pkts[i]; if (i == nb_bufs) return nb_bufs; } diff --git a/drivers/net/i40e/i40e_rxtx_vec_sse.c b/drivers/net/i40e/i40e_rxtx_vec_sse.c index 3b22588..89ffc23 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_sse.c +++ b/drivers/net/i40e/i40e_rxtx_vec_sse.c @@ -504,6 +504,7 @@ i40e_recv_scattered_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts, /* find the first split flag, and only reassemble then*/ while (i < nb_bufs && !split_flags[i]) i++; + rxq->pkt_first_seg = rx_pkts[i]; if (i == nb_bufs) return nb_bufs; } -- 2.7.4