From: Paolo Abeni <pabeni@redhat.com>
To: Yige Jiang <yigejiang86@gmail.com>,
Madalin Bucur <madalin.bucur@nxp.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>
Cc: Sean Anderson <sean.anderson@linux.dev>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] fsl/fman: Drop device references when dpaa_eth_add_device() fails
Date: Fri, 4 Dec 2026 13:02:17 +0100 [thread overview]
Message-ID: <9307bd6a-5444-478b-8382-bf53964237c7@redhat.com> (raw)
In-Reply-To: <rc-b1-20261110-vc-177-85d2478ac4b9@gmail.com>
On 11/26/26 10:37, Yige Jiang wrote:
> When dpaa_eth_add_device() fails at the end of mac_probe(), the error
> is returned directly. This skips the _return_dev_arr_put and
> _return_dev_put labels, so the references held on the FMan device and
> on both FMan port devices are never dropped. mac_remove() would drop
> them, but it does not run after a failed probe.
>
> Jump to _return_dev_arr_put instead, as the init() failure above does.
> The devices are created from the device tree and are not normally
> removed, so the leaked references have no visible effect in practice.
> The MAC state allocated by init() is still not freed on this path, as
> in mac_remove(); that needs a separate change.
>
> Fixes: 1dec67e0d9fb ("fsl/fman: Fix refcount handling of fman-related devices")
> Signed-off-by: Yige Jiang <yigejiang86@gmail.com>
The same error path has more issues, please address all of them together:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/rc-b1-20261110-vc-177-85d2478ac4b9@gmail.com
/P
prev parent reply other threads:[~2026-12-04 12:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 9:37 [PATCH net] fsl/fman: Drop device references when dpaa_eth_add_device() fails Yige Jiang
2026-11-26 9:42 ` netdev-bot+sinfo
2026-11-26 11:53 ` Yige Jiang
2026-12-04 12:02 ` Paolo Abeni [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=9307bd6a-5444-478b-8382-bf53964237c7@redhat.com \
--to=pabeni@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=sean.anderson@linux.dev \
--cc=yigejiang86@gmail.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