[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107114434.05e6b875@kernel.org>
Date: Thu, 7 Nov 2024 11:44:34 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: "Nelson, Shannon" <shannon.nelson@....com>
Cc: Wentao Liang <liangwentao@...as.ac.cn>, brett.creeley@....com,
davem@...emloft.net, linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Wentao Liang <Wentao_liang_g@....com>
Subject: Re: [PATCH net v3] drivers: net: ionic: add missed debugfs cleanup
to ionic_probe() error path
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@....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@....com>
>
> Thanks! -sln
>
> Acked-by: Shannon Nelson <shannon.nelson@....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() ?
Powered by blists - more mailing lists