Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: wang xiaolei <xiaolei.wang@windriver.com>
To: Wei Fang <wei.fang@nxp.com>, Andrew Lunn <andrew@lunn.ch>
Cc: Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [net PATCH] net: fec: free fec queue when fec_enet_mii_init() fails
Date: Thu, 23 May 2024 10:23:53 +1100	[thread overview]
Message-ID: <843c073e-1082-4732-bf2f-15960d12d992@windriver.com> (raw)
In-Reply-To: <PAXPR04MB85100FA1D553CE1E8523269088EB2@PAXPR04MB8510.eurprd04.prod.outlook.com>


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


      reply	other threads:[~2024-05-22 23:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22  2:13 [net PATCH] net: fec: free fec queue when fec_enet_mii_init() fails Xiaolei Wang
2024-05-22  3:04 ` Wei Fang
2024-05-22  3:14   ` Andrew Lunn
2024-05-22  7:28     ` Wei Fang
2024-05-22 23:23       ` wang xiaolei [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=843c073e-1082-4732-bf2f-15960d12d992@windriver.com \
    --to=xiaolei.wang@windriver.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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