[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221114204839.6cee0697@kernel.org>
Date: Mon, 14 Nov 2022 20:48:39 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: wangyufen <wangyufen@...wei.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>,
<edumazet@...gle.com>, <pabeni@...hat.com>,
Jiri Pirko <jiri@...lanox.com>
Subject: Re: [PATCH] netdevsim: Fix memory leak of nsim_dev->fa_cookie
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?
Powered by blists - more mailing lists