From: Jakub Kicinski <kuba@kernel.org>
To: wangyufen <wangyufen@huawei.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>,
Jiri Pirko <jiri@mellanox.com>
Subject: Re: [PATCH] netdevsim: Fix memory leak of nsim_dev->fa_cookie
Date: Mon, 14 Nov 2022 20:48:39 -0800 [thread overview]
Message-ID: <20221114204839.6cee0697@kernel.org> (raw)
In-Reply-To: <df913f58-d301-4df7-aeca-7cb83d18793f@huawei.com>
On Tue, 15 Nov 2022 11:38:26 +0800 wangyufen wrote:
> Sorry, I didn't make it clear.
>
> The detailed process of nsim_dev_trap_report_work() is as follows:
>
> nsim_dev_trap_report_work()
> nsim_dev_trap_report_work()
> ...
> devlink_trap_report()
> devlink_trap_report_metadata_set()
> <-- fa_cookie is assigned to metadata->fa_cookie here, and will be freed in net_dm_hw_metadata_free()
What's assigned here and freed in net_dm_hw_metadata_free() is a copy
made with net_dm_hw_metadata_copy(), no?
Could you double check the whole path?
prev parent reply other threads:[~2022-11-15 4:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 6:28 [PATCH] netdevsim: Fix memory leak of nsim_dev->fa_cookie Wang Yufen
2022-11-15 2:50 ` Jakub Kicinski
2022-11-15 3:38 ` wangyufen
2022-11-15 4:48 ` Jakub Kicinski [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=20221114204839.6cee0697@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangyufen@huawei.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).