From: Bruce Richardson <bruce.richardson@intel.com>
To: Anurag Mandal <anurag.mandal@intel.com>
Cc: <dev@dpdk.org>, <anatoly.burakov@intel.com>
Subject: Re: [PATCH 1/7] net/ice: fix DDP package double free on init failure
Date: Tue, 27 Oct 2026 12:45:52 +0000 [thread overview]
Message-ID: <auCdADZs8rY1xIsB@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <auCbllLxK2e6rYUY@bricha3-mobl1.ger.corp.intel.com>
On Tue, Oct 27, 2026 at 12:39:50PM +0000, Bruce Richardson wrote:
> On Tue, Oct 27, 2026 at 10:51:31AM +0000, Anurag Mandal wrote:
> > When ice_init_hw_tbls() fails, ice_dev_init() frees the DDP package
> > copy but leaves hw->pkg_copy and hw->seg pointing into it. Without
> > safe mode, the error path then calls ice_deinit_hw(), which frees
> > the package copy again through ice_free_seg().
> >
> > Use ice_free_seg(), which also clears these pointers.
> >
> > Fixes: 9c4f15901ada ("net/ice: free memory with matching allocator")
> >
> > Signed-off-by: Anurag Mandal <anurag.mandal@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
I think this needs a backport, because it also fixes:
Fixes: 7f7cbf80bdb7 ("net/ice: factorize firmware loading")
So will add that and CC stable on apply.
> > ---
> > drivers/net/intel/ice/ice_ethdev.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
> > index b846555b97..dd3a4976ab 100644
> > --- a/drivers/net/intel/ice/ice_ethdev.c
> > +++ b/drivers/net/intel/ice/ice_ethdev.c
> > @@ -2785,7 +2785,7 @@ ice_dev_init(struct rte_eth_dev *dev)
> > ret = ice_init_hw_tbls(hw);
> > if (ret) {
> > PMD_INIT_LOG(ERR, "ice_init_hw_tbls failed: %d", ret);
> > - ice_free(hw, hw->pkg_copy);
> > + ice_free_seg(hw);
> > }
> > }
> >
> > --
> > 2.25.1
> >
next prev parent reply other threads:[~2026-10-27 12:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 10:51 [PATCH 0/7] net/ice: fix memory leaks Anurag Mandal
2026-10-27 10:51 ` [PATCH 1/7] net/ice: fix DDP package double free on init failure Anurag Mandal
2026-10-27 12:39 ` Bruce Richardson
2026-10-27 12:45 ` Bruce Richardson [this message]
2026-10-27 10:51 ` [PATCH 2/7] net/ice: fix memory leaks on port close Anurag Mandal
2026-10-27 13:17 ` Bruce Richardson
2026-10-27 10:51 ` [PATCH 3/7] net/ice: fix DDP filename leak Anurag Mandal
2026-10-27 13:52 ` Bruce Richardson
2026-10-27 10:51 ` [PATCH 4/7] net/ice: fix main VSI leak on init failure Anurag Mandal
2026-10-27 14:58 ` Bruce Richardson
2026-10-27 10:51 ` [PATCH 5/7] net/ice: fix MAC and VLAN filter leak on VSI release Anurag Mandal
2026-10-27 15:09 ` Bruce Richardson
2026-10-27 10:51 ` [PATCH 6/7] net/ice: fix FDIR resource leak on setup failure Anurag Mandal
2026-10-27 15:19 ` Bruce Richardson
2026-10-27 10:51 ` [PATCH 7/7] net/ice: fix ACL profile segment leak Anurag Mandal
2026-10-27 15:27 ` Bruce Richardson
2026-10-27 15:28 ` [PATCH 0/7] net/ice: fix memory leaks Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=auCdADZs8rY1xIsB@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=anurag.mandal@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox