public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: haokexin@gmail.com
Cc: horms@kernel.org, edumazet@google.com, davem@davemloft.net,
	netdev@vger.kernel.org, vadim.fedorenko@linux.dev,
	elfring@users.sourceforge.net, byungchul@sk.com,
	andrew+netdev@lunn.ch, h-mittal1@ti.com, danishanwar@ti.com,
	pabeni@redhat.com, m-malladi@ti.com, jacob.e.keller@intel.com,
	rogerq@kernel.org
Subject: Re: [net-next,1/2] net: ti: icssg-prueth-sr1: Remove unused workqueue
Date: Wed, 4 Feb 2026 20:19:14 -0800	[thread overview]
Message-ID: <20260204201914.73fec717@kernel.org> (raw)
In-Reply-To: <20260205041702.2354424-1-kuba@kernel.org>

On Wed,  4 Feb 2026 20:17:02 -0800 Jakub Kicinski wrote:
> > @@ -883,8 +878,6 @@
> >
> >  free:
> >  	pruss_release_mem_region(prueth->pruss, &emac->dram);
> > -free_wq:
> > -	destroy_workqueue(emac->cmd_wq);
> >  free_ndev:
> >  	emac->ndev = NULL;
> >  	prueth->emac[mac] = NULL;  
> 
> Removing the workqueue creation here is fine for the SR1 driver's own error
> path, but doesn't the shared cleanup function prueth_netdev_exit() in
> icssg_common.c still call destroy_workqueue(emac->cmd_wq) unconditionally?
> 
> void prueth_netdev_exit(struct prueth *prueth, ...)
> {
>     ...
>     pruss_release_mem_region(prueth->pruss, &emac->dram);
>     destroy_workqueue(emac->cmd_wq);
>     free_netdev(emac->ndev);
>     ...
> }
> 
> Since emac is zero-initialized from alloc_netdev_mqs(), emac->cmd_wq will be
> NULL after this patch. Can this cause a NULL pointer dereference in
> destroy_workqueue() on module unload, since destroy_workqueue() does not
> check for NULL?

Maybe it's not worth separating the removal into two patches if there
are surprising dependencies here? Squash them into one for v2 perhaps?

  reply	other threads:[~2026-02-05  4:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04  2:41 [PATCH net-next 0/2] net: ti: icssg: Remove dedicated workqueue for ndo_set_rx_mode callback Kevin Hao
2026-02-04  2:41 ` [PATCH net-next 1/2] net: ti: icssg-prueth-sr1: Remove unused workqueue Kevin Hao
2026-02-04 10:38   ` Markus Elfring
2026-02-04 12:08     ` Kevin Hao
2026-02-05  4:17   ` [net-next,1/2] " Jakub Kicinski
2026-02-05  4:19     ` Jakub Kicinski [this message]
2026-02-05  5:49       ` Kevin Hao
2026-02-04  2:41 ` [PATCH net-next 2/2] net: ti: icssg-prueth: Use system default workqueue in ndo_set_rx_mode callback Kevin Hao
2026-02-04 10:45   ` Markus Elfring
2026-02-04 12:10     ` Kevin Hao
2026-02-04 11:14 ` [EXTERNAL] [PATCH net-next 0/2] net: ti: icssg: Remove dedicated workqueue for " Meghana Malladi
2026-02-04 12:12   ` Kevin Hao

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=20260204201914.73fec717@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=byungchul@sk.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=elfring@users.sourceforge.net \
    --cc=h-mittal1@ti.com \
    --cc=haokexin@gmail.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=m-malladi@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=vadim.fedorenko@linux.dev \
    /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