All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Fushuai Wang <wangfushuai@baidu.com>
Cc: ioana.ciornei@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] dpaa2-eth: fix xdp_rxq_info leak in dpaa2_eth_setup_rx_flow
Date: Wed, 25 Jun 2025 11:43:39 +0100	[thread overview]
Message-ID: <20250625104339.GW1562@horms.kernel.org> (raw)
In-Reply-To: <20250624144235.69622-1-wangfushuai@baidu.com>

On Tue, Jun 24, 2025 at 10:42:35PM +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())


  reply	other threads:[~2025-06-25 10:43 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 [this message]
2025-06-25 12:55   ` Fushuai Wang
2025-06-25 17:00     ` Simon Horman

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=20250625104339.GW1562@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.