lkml.org 
[lkml]   [2024]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [net PATCH] net: fec: free fec queue when fec_enet_mii_init() fails
From

On 5/22/24 6:28 PM, Wei Fang wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>> -----Original Message-----
>> From: Andrew Lunn <andrew@lunn.ch>
>> Sent: 2024年5月22日 11:15
>> To: Wei Fang <wei.fang@nxp.com>
>> Cc: Xiaolei Wang <xiaolei.wang@windriver.com>; Shenwei Wang
>> <shenwei.wang@nxp.com>; Clark Wang <xiaoning.wang@nxp.com>;
>> davem@davemloft.net; edumazet@google.com; kuba@kernel.org;
>> pabeni@redhat.com; imx@lists.linux.dev; netdev@vger.kernel.org;
>> linux-kernel@vger.kernel.org
>> Subject: Re: [net PATCH] net: fec: free fec queue when fec_enet_mii_init() fails
>>
>>> The commit 59d0f7465644 ("net: fec: init multi queue date structure")
>>> was the first to introduce this issue, commit 619fee9eb13b
>>> ("net: fec: fix the potential memory leak in fec_enet_init() ") fixed
>>> this, but it does not seem to be completely fixed.
>> This fix is also not great, and i would say the initial design is really the problem.
>> There needs to be a function which is the opposite of fec_enet_init(). It can
>> then be called in the probe cleanup code, and in fec_drv_remove() which also
>> appears to leak the queues.
>>
> Yes, this issue also exists when the fec driver is unbound, maybe Xiaolei can
> help improve it in his patch.

I will add fec_enet_free_queue() to fec_drv_remove in v2 version

thanks

xiaolei


\
 
 \ /
  Last update: 2024-05-23 01:24    [W:0.037 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site