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 35A0FA04AB for ; Thu, 7 Nov 2019 06:45:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09C281E889; Thu, 7 Nov 2019 06:45:01 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id AC3AF1E540; Thu, 7 Nov 2019 06:44:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 21:44:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,276,1569308400"; d="scan'208";a="227722305" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 06 Nov 2019 21:44:55 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 21:44:55 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 6 Nov 2019 21:44:55 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.213]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.200]) with mapi id 14.03.0439.000; Thu, 7 Nov 2019 13:44:53 +0800 From: "Wang, ShougangX" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "Yang, Qiming" , "Xing, Beilei" , "Cao, Yahui" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/ice: fix wild pointer Thread-Index: AQHVk79++oqz8L05qUybHEdQGORg36d+htiAgAAC1ACAAKs+gA== Date: Thu, 7 Nov 2019 05:44:53 +0000 Message-ID: <00A8E5A1740DFA49A87AFFAC34B8EDEA3BE6E2@SHSMSX101.ccr.corp.intel.com> References: <20191105033806.2878-1-shougangx.wang@intel.com> <20191107031955.GE68021@intel.com> <20191107033002.GB100445@intel.com> In-Reply-To: <20191107033002.GB100445@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ice: fix wild pointer X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Ye, Xiaolong > Sent: Thursday, November 7, 2019 11:30 AM > To: Wang, ShougangX > Cc: dev@dpdk.org; Yang, Qiming ; Xing, Beilei > ; Cao, Yahui ; stable@dpdk.or= g > Subject: Re: [dpdk-dev] [PATCH] net/ice: fix wild pointer >=20 > On 11/07, Ye Xiaolong wrote: > >On 11/05, Wang ShougangX wrote: > >>To avoid wild pointer, pointers should be set to NULL after free them. > >> > >>Fixes: 1a2fc1799f09 ("net/ice: reject duplicated flow for flow director= ") > >>Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") > >>Cc: stable@dpdk.org > >> > >>Signed-off-by: Wang ShougangX > >>--- > >> drivers/net/ice/ice_fdir_filter.c | 8 +++++++- > >> 1 file changed, 7 insertions(+), 1 deletion(-) > >> > >>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fd= ir_filter.c > >>index 736ccd54e..d2c754f07 100644 > >>--- a/drivers/net/ice/ice_fdir_filter.c > >>+++ b/drivers/net/ice/ice_fdir_filter.c > >>@@ -403,6 +403,9 @@ ice_fdir_release_filter_list(struct ice_pf *pf) > >> rte_free(fdir_info->hash_map); > >> if (fdir_info->hash_table) > >> rte_hash_free(fdir_info->hash_table); > >>+ > >>+ fdir_info->hash_map =3D NULL; > >>+ fdir_info->hash_table =3D NULL; > >> } > >> > >> /* > >>@@ -525,10 +528,13 @@ ice_fdir_prof_free(struct ice_hw *hw) > >> > >> for (ptype =3D ICE_FLTR_PTYPE_NONF_IPV4_UDP; > >> ptype < ICE_FLTR_PTYPE_MAX; > >>- ptype++) > >>+ ptype++) { > >> rte_free(hw->fdir_prof[ptype]); > >>+ hw->fdir_prof[ptype] =3D NULL; > >>+ } > >> > >> rte_free(hw->fdir_prof); > >>+ hw->fdir_prof =3D NULL; > >> } > >> > >> /* Remove a profile for some filter type */ > >>-- > >>2.17.1 > >> > > > >Reviewed-by: Xiaolong Ye > > > >Applied to dpdk-next-net-intel. Thanks. >=20 > Please ignore this mail, I'm still waiting for your new patchset. >=20 OK, I will make a patchset. > Thanks, > Xiaolong Thanks. Shougang