From: Jakub Kicinski <kuba@kernel.org>
To: "Nelson, Shannon" <shannon.nelson@amd.com>
Cc: Wentao Liang <liangwentao@iscas.ac.cn>,
brett.creeley@amd.com, davem@davemloft.net,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Wentao Liang <Wentao_liang_g@163.com>
Subject: Re: [PATCH net v3] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path
Date: Thu, 7 Nov 2024 11:44:34 -0800 [thread overview]
Message-ID: <20241107114434.05e6b875@kernel.org> (raw)
In-Reply-To: <79f0ce60-58a5-4757-88eb-1cdc8a80388b@amd.com>
On Thu, 7 Nov 2024 11:31:50 -0800 Nelson, Shannon wrote:
> On 11/6/2024 6:17 PM, Wentao Liang wrote:
> >
> > From: Wentao Liang <Wentao_liang_g@163.com>
> >
> > The ionic_setup_one() creates a debugfs entry for ionic upon
> > successful execution. However, the ionic_probe() does not
> > release the dentry before returning, resulting in a memory
> > leak.
> >
> > To fix this bug, we add the ionic_debugfs_del_dev() to release
> > the resources in a timely manner before returning.
> >
> > Fixes: 0de38d9f1dba ("ionic: extract common bits from ionic_probe")
> > Signed-off-by: Wentao Liang <Wentao_liang_g@163.com>
>
> Thanks! -sln
>
> Acked-by: Shannon Nelson <shannon.nelson@amd.com>
Just in time to still make today's PR ;)
This change looks fine but as a future refactoring perhaps there should
be a wrapper for:
ionic_dev_teardown(ionic);
ionic_clear_pci(ionic);
ionic_debugfs_del_dev(ionic);
which pairs with ionic_setup() ?
next prev parent reply other threads:[~2024-11-07 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 2:17 [PATCH net v3] drivers: net: ionic: add missed debugfs cleanup to ionic_probe() error path Wentao Liang
2024-11-07 19:31 ` Nelson, Shannon
2024-11-07 19:44 ` Jakub Kicinski [this message]
2024-11-07 19:47 ` Nelson, Shannon
2024-11-07 19:50 ` patchwork-bot+netdevbpf
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=20241107114434.05e6b875@kernel.org \
--to=kuba@kernel.org \
--cc=Wentao_liang_g@163.com \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=liangwentao@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@amd.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;
as well as URLs for NNTP newsgroup(s).