DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/ice: fix wild pointer
@ 2019-11-05  3:38 Wang ShougangX
  2019-11-07  2:22 ` [dpdk-dev] [PATCH v2 0/4] net/ice: fix memory release in FDIR Wang ShougangX
                   ` (3 more replies)
  0 siblings, 4 replies; 47+ messages in thread
From: Wang ShougangX @ 2019-11-05  3:38 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, beilei.xing, yahui.cao, Wang ShougangX, stable

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 <shougangx.wang@intel.com>
---
 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_fdir_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 = NULL;
+	fdir_info->hash_table = NULL;
 }
 
 /*
@@ -525,10 +528,13 @@ ice_fdir_prof_free(struct ice_hw *hw)
 
 	for (ptype = ICE_FLTR_PTYPE_NONF_IPV4_UDP;
 	     ptype < ICE_FLTR_PTYPE_MAX;
-	     ptype++)
+	     ptype++) {
 		rte_free(hw->fdir_prof[ptype]);
+		hw->fdir_prof[ptype] = NULL;
+	}
 
 	rte_free(hw->fdir_prof);
+	hw->fdir_prof = NULL;
 }
 
 /* Remove a profile for some filter type */
-- 
2.17.1


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2019-11-13  8:57 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05  3:38 [dpdk-dev] [PATCH] net/ice: fix wild pointer Wang ShougangX
2019-11-07  2:22 ` [dpdk-dev] [PATCH v2 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-07  2:22   ` [dpdk-dev] [PATCH v2 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-11  8:09     ` Ye Xiaolong
2019-11-11  8:39       ` Wang, ShougangX
2019-11-07  2:22   ` [dpdk-dev] [PATCH v2 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-07  2:22   ` [dpdk-dev] [PATCH v2 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-07  2:22   ` [dpdk-dev] [PATCH v2 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-12  0:00   ` [dpdk-dev] [PATCH v3 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-12  0:10   ` Wang ShougangX
2019-11-12  0:10     ` [dpdk-dev] [PATCH v3 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-12  0:10     ` [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-12  0:10     ` [dpdk-dev] [PATCH v3 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-12  0:10     ` [dpdk-dev] [PATCH v3 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-12  0:26   ` [dpdk-dev] [PATCH v3 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-12  0:26     ` [dpdk-dev] [PATCH v3 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-12  0:26     ` [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-12  0:27     ` [dpdk-dev] [PATCH v3 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-12  7:42       ` Zhang, Qi Z
2019-11-12  0:27     ` [dpdk-dev] [PATCH v3 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-12  7:39       ` Zhang, Qi Z
2019-11-12  0:50   ` [dpdk-dev] [PATCH v3 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-12  0:50     ` [dpdk-dev] [PATCH v3 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-12  7:45       ` Zhang, Qi Z
2019-11-12  0:50     ` [dpdk-dev] [PATCH v3 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-12  7:50       ` Zhang, Qi Z
2019-11-12  8:03         ` Wang, ShougangX
2019-11-12  0:50     ` [dpdk-dev] [PATCH v3 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-12  0:50     ` [dpdk-dev] [PATCH v3 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-07  3:19 ` [dpdk-dev] [PATCH] " Ye Xiaolong
2019-11-07  3:30   ` Ye Xiaolong
2019-11-07  5:44     ` Wang, ShougangX
2019-11-12  3:50 ` [dpdk-dev] [PATCH v4 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-12  3:50   ` [dpdk-dev] [PATCH v4 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-12  3:50   ` [dpdk-dev] [PATCH v4 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-12 10:36     ` Yang, Qiming
2019-11-13  6:21       ` Wang, ShougangX
2019-11-12  3:50   ` [dpdk-dev] [PATCH v4 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-12  3:50   ` [dpdk-dev] [PATCH v4 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-13  1:37 ` [dpdk-dev] [PATCH v5 0/4] net/ice: fix memory release in FDIR Wang ShougangX
2019-11-13  1:37   ` [dpdk-dev] [PATCH v5 1/4] net/ice: fix memzone reserve and " Wang ShougangX
2019-11-13  1:37   ` [dpdk-dev] [PATCH v5 2/4] net/ice: fix removal of FDIR profile Wang ShougangX
2019-11-13  8:44     ` Yang, Qiming
2019-11-13  1:37   ` [dpdk-dev] [PATCH v5 3/4] net/ice: fix FDIR counter resource release Wang ShougangX
2019-11-13  1:37   ` [dpdk-dev] [PATCH v5 4/4] net/ice: fix wild pointer Wang ShougangX
2019-11-13  8:44     ` Yang, Qiming
2019-11-13  8:54   ` [dpdk-dev] [PATCH v5 0/4] net/ice: fix memory release in FDIR Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).