Thread (22 messages) 22 messages, 4 authors, 2025-04-21

Re: [PATCH v5 net-next 04/14] net: enetc: add MAC filtering for i.MX95 ENETC PF

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2025-04-18 14:30:03
Also in: imx, linux-arm-kernel, lkml, netdev

On Wed, Apr 16, 2025 at 05:16:15AM +0000, Wei Fang wrote:
quoted
-----Original Message-----
From: Jakub Kicinski <kuba@kernel.org>
Sent: 2025年4月16日 11:43
To: Wei Fang <wei.fang@nxp.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>; Vladimir Oltean
[off-list ref]; Clark Wang [off-list ref];
andrew+netdev@lunn.ch; davem@davemloft.net; edumazet@google.com;
pabeni@redhat.com; christophe.leroy@csgroup.eu; netdev@vger.kernel.org;
linux-kernel@vger.kernel.org; imx@lists.linux.dev; linuxppc-dev@lists.ozlabs.org;
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 net-next 04/14] net: enetc: add MAC filtering for i.MX95
ENETC PF

On Fri, 11 Apr 2025 17:57:42 +0800 Wei Fang wrote:
quoted
 	enetc4_pf_netdev_destroy(si);
 	enetc4_pf_free(pf);
+	destroy_workqueue(si->workqueue);
I think that you need to flush or cancel the work after unregistering
the netdev but before freeing it? The work may access netdev after its
freed.
Yes, you are right, I will improve it. thanks.
I think the workqueue creation needs to be handled in
enetc4_pf_netdev_create() somewhere in between alloc_etherdev_mqs() and
register_netdev(), so that the workqueue is available as soon as the
interface is registered, but also so that the workqueue teardown takes
places naturally where Jakub indicated.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help