Re: [net-next,1/2] net: ti: icssg-prueth-sr1: Remove unused workqueue
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-05 04:19:16
On Wed, 4 Feb 2026 20:17:02 -0800 Jakub Kicinski wrote:
quoted
@@ -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?