* [dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free
@ 2021-06-04 2:02 dapengx.yu
2021-06-07 0:46 ` Zhang, Qi Z
0 siblings, 1 reply; 2+ messages in thread
From: dapengx.yu @ 2021-06-04 2:02 UTC (permalink / raw)
To: Beilei Xing; +Cc: dev, Dapeng Yu, stable
From: Dapeng Yu <dapengx.yu@intel.com>
The original code use a heap pointer after it is freed.
Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
---
drivers/net/i40e/i40e_fdir.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ac0e09bfdd..3983122af7 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -301,11 +301,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)
if (err)
PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off");
- i40e_dev_rx_queue_release(pf->fdir.rxq);
rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id);
+ i40e_dev_rx_queue_release(pf->fdir.rxq);
pf->fdir.rxq = NULL;
- i40e_dev_tx_queue_release(pf->fdir.txq);
rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id);
+ i40e_dev_tx_queue_release(pf->fdir.txq);
pf->fdir.txq = NULL;
i40e_vsi_release(vsi);
pf->fdir.fdir_vsi = NULL;
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free
2021-06-04 2:02 [dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free dapengx.yu
@ 2021-06-07 0:46 ` Zhang, Qi Z
0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-06-07 0:46 UTC (permalink / raw)
To: Yu, DapengX, Xing, Beilei; +Cc: dev, Yu, DapengX, stable
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of dapengx.yu@intel.com
> Sent: Friday, June 4, 2021 10:02 AM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free
>
> From: Dapeng Yu <dapengx.yu@intel.com>
>
> The original code use a heap pointer after it is freed.
>
> Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-07 0:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 2:02 [dpdk-dev] [PATCH] net/i40e: fix using heap pointer after free dapengx.yu
2021-06-07 0:46 ` Zhang, Qi Z
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).