Message ID | 20210709031459.864943-1-dapengx.yu@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Qi Zhang |
Headers | show |
Series | [v2] net/ixgbe: fix using heap pointer after free | expand |
Context | Check | Description |
---|---|---|
ci/Intel-compilation | warning | apply issues |
ci/iol-testing | success | Testing PASS |
ci/iol-abi-testing | warning | Testing issues |
ci/iol-intel-Functional | success | Functional Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/github-robot | success | github build: passed |
ci/checkpatch | success | coding style OK |
> -----Original Message----- > From: Yu, DapengX <dapengx.yu@intel.com> > Sent: Friday, July 9, 2021 11:15 > To: Wang, Haiyue <haiyue.wang@intel.com> > Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org > Subject: [PATCH v2] net/ixgbe: fix using heap pointer after free > > From: Dapeng Yu <dapengx.yu@intel.com> > > The original code use a heap pointer after it is freed. > This patch fix it. > > Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") > Cc: stable@dpdk.org > > Signed-off-by: Dapeng Yu <dapengx.yu@intel.com> > --- > V2: > * Simplify the patch according to maintainer's comment: > only one "pmd_flow" in the list, so just "break;" is fine. > --- > drivers/net/ixgbe/ixgbe_flow.c | 1 + > 1 file changed, 1 insertion(+) > Good catch, thanks! Reviewed-by: Haiyue Wang <haiyue.wang@intel.com> > -- > 2.27.0
> -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Wang, Haiyue > Sent: Friday, July 9, 2021 12:35 PM > To: Yu, DapengX <dapengx.yu@intel.com> > Cc: dev@dpdk.org; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix using heap pointer after free > > > -----Original Message----- > > From: Yu, DapengX <dapengx.yu@intel.com> > > Sent: Friday, July 9, 2021 11:15 > > To: Wang, Haiyue <haiyue.wang@intel.com> > > Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org > > Subject: [PATCH v2] net/ixgbe: fix using heap pointer after free > > > > From: Dapeng Yu <dapengx.yu@intel.com> > > > > The original code use a heap pointer after it is freed. > > This patch fix it. > > > > Fixes: a14de8b498d1 ("net/ixgbe: destroy consistent filter") > > Cc: stable@dpdk.org > > > > Signed-off-by: Dapeng Yu <dapengx.yu@intel.com> > > --- > > V2: > > * Simplify the patch according to maintainer's comment: > > only one "pmd_flow" in the list, so just "break;" is fine. > > --- > > drivers/net/ixgbe/ixgbe_flow.c | 1 + > > 1 file changed, 1 insertion(+) > > > > Good catch, thanks! > > Reviewed-by: Haiyue Wang <haiyue.wang@intel.com> Applied to dpdk-next-net-intel. Thanks Qi > > > > -- > > 2.27.0
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index 0b10e91a9b..511b612f7f 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -3437,6 +3437,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev, TAILQ_REMOVE(&ixgbe_flow_list, ixgbe_flow_mem_ptr, entries); rte_free(ixgbe_flow_mem_ptr); + break; } } rte_free(flow);