From: Simon Horman <horms@kernel.org>
To: Fushuai Wang <wangfushuai@baidu.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
ioana.ciornei@nxp.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH net] dpaa2-eth: fix xdp_rxq_info leak in dpaa2_eth_setup_rx_flow
Date: Wed, 25 Jun 2025 18:00:01 +0100 [thread overview]
Message-ID: <20250625170001.GI1562@horms.kernel.org> (raw)
In-Reply-To: <20250625125547.19602-1-wangfushuai@baidu.com>
On Wed, Jun 25, 2025 at 08:55:47PM +0800, Fushuai Wang wrote:
> >> When xdp_rxq_info_reg_mem_model() fails after a successful
> >> xdp_rxq_info_reg(), the kernel may leaks the registered RXQ
> >> info structure. Fix this by calling xdp_rxq_info_unreg() in
> >> the error path, ensuring proper cleanup when memory model
> >> registration fails.
> >>
> >> Fixes: d678be1dc1ec ("dpaa2-eth: add XDP_REDIRECT support")
> >> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
> >
> > Thanks, I agree this is needed.
> >
> > Reviewed-by: Simon Horman <horms@kernel.org>
> >
> > But I wonder how these resources are released in the following cases:
> >
> > * Error in dpaa2_eth_bind_dpni() after at least one
> > successful call to dpaa2_eth_setup_rx_flow()
> >
> > * Error in dpaa2_eth_probe() after a successful call to
> > dpaa2_eth_bind_dpni()
> >
> > * Driver removal (dpaa2_eth_remove())
>
> Hi, Simon
>
> I think these paths also leak xdp_rxq_info.
> I'll add cleanup for them and send v2 shortly.
Great, thanks.
prev parent reply other threads:[~2025-06-25 17:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 14:42 [PATCH net] dpaa2-eth: fix xdp_rxq_info leak in dpaa2_eth_setup_rx_flow Fushuai Wang
2025-06-25 10:43 ` Simon Horman
2025-06-25 12:55 ` Fushuai Wang
2025-06-25 17:00 ` Simon Horman [this message]
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=20250625170001.GI1562@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangfushuai@baidu.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.