net/i40e: fix wild pointer
authorWei Zhao <wei.zhao1@intel.com>
Mon, 18 May 2020 08:00:51 +0000 (16:00 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 19 May 2020 15:12:16 +0000 (17:12 +0200)
commitb342fd9084cf99292f0077e16b0edb3b6b79f6e7
treeddc17fbdab8564bccc2a0f4544db19ecdc864e0d
parentfc38d81b51c6be7648e21d16f95bdb2d46de9746
net/i40e: fix wild pointer

In i40e PMD code of function i40e_res_pool_free(), if valid_entry
is freed by "rte_free(valid_entry);" in the code, then the following
code for pool update may still use the wild pointer "valid_entry"
for pool info update. It seems has the risk of core dump for
using wild pointer operation, we should avoid this risk.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Reviewed-by: Jeff Guo <jia.guo@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/i40e/i40e_ethdev.c