netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net,v2] mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init
       [not found] <20230628100116.2199367-1-shaozhengchao@huawei.com>
@ 2023-06-29 18:08 ` Jakub Kicinski
  2023-06-30  0:55   ` shaozhengchao
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2023-06-29 18:08 UTC (permalink / raw)
  To: Zhengchao Shao
  Cc: netdev, davem, edumazet, pabeni, idosch, petrm, jiri, vadimp,
	yuehaibing

On Wed, 28 Jun 2023 18:01:16 +0800 Zhengchao Shao wrote:
> The line cards array is not freed in the error path of
> mlxsw_m_linecards_init(), which can lead to a memory leak. Fix by
> freeing the array in the error path, thereby making the error path
> identical to mlxsw_m_linecards_fini().
> 
> Fixes: 01328e23a476 ("mlxsw: minimal: Extend module to port mapping with slot index")
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Petr Machata <petrm@nvidia.com>

Could you please resend with Ido's review tag included?

Due to unforeseen mail server issues (it wouldn't be a merge window
without vger imploding, eh?) the patch did not make it to patchwork
or email archives.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net,v2] mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init
  2023-06-29 18:08 ` [PATCH net,v2] mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init Jakub Kicinski
@ 2023-06-30  0:55   ` shaozhengchao
  0 siblings, 0 replies; 2+ messages in thread
From: shaozhengchao @ 2023-06-30  0:55 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: netdev, davem, edumazet, pabeni, idosch, petrm, jiri, vadimp,
	yuehaibing



On 2023/6/30 2:08, Jakub Kicinski wrote:
> On Wed, 28 Jun 2023 18:01:16 +0800 Zhengchao Shao wrote:
>> The line cards array is not freed in the error path of
>> mlxsw_m_linecards_init(), which can lead to a memory leak. Fix by
>> freeing the array in the error path, thereby making the error path
>> identical to mlxsw_m_linecards_fini().
>>
>> Fixes: 01328e23a476 ("mlxsw: minimal: Extend module to port mapping with slot index")
>> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
>> Reviewed-by: Petr Machata <petrm@nvidia.com>
> 
> Could you please resend with Ido's review tag included?
> 
  OK,I will resend this patch. Thank you.

Zhengchao Shao
> Due to unforeseen mail server issues (it wouldn't be a merge window
> without vger imploding, eh?) the patch did not make it to patchwork
> or email archives.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-30  0:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230628100116.2199367-1-shaozhengchao@huawei.com>
2023-06-29 18:08 ` [PATCH net,v2] mlxsw: minimal: fix potential memory leak in mlxsw_m_linecards_init Jakub Kicinski
2023-06-30  0:55   ` shaozhengchao

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).