From: Fushuai Wang <wangfushuai@baidu.com>
To: <horms@kernel.org>
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>, <wangfushuai@baidu.com>
Subject: Re: [PATCH net] dpaa2-eth: fix xdp_rxq_info leak in dpaa2_eth_setup_rx_flow
Date: Wed, 25 Jun 2025 20:55:47 +0800 [thread overview]
Message-ID: <20250625125547.19602-1-wangfushuai@baidu.com> (raw)
In-Reply-To: <20250625104339.GW1562@horms.kernel.org>
>> 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.
--
Regards,
Wang
next prev parent reply other threads:[~2025-06-25 12:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-24 14:42 Fushuai Wang
2025-06-25 10:43 ` Simon Horman
2025-06-25 12:55 ` Fushuai Wang [this message]
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=20250625125547.19602-1-wangfushuai@baidu.com \
--to=wangfushuai@baidu.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®