lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTKYySrs9vZP9vmM@nxpwireless-Inspiron-14-Plus-7440>
Date: Fri, 5 Dec 2025 16:33:13 +0800
From: jeff.chen_1@....com
To: Abdun Nihaal <abdun.nihaal@...il.com>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	briannorris@...omium.org, johannes@...solutions.net,
	francesco@...cini.it, tsung-hsien.hsieh@....com,
	s.hauer@...gutronix.de
Subject: Re: [PATCH v7 18/22] wifi: nxpwifi: add core driver implementation

On Thu, Nov 20, 2025 at 09:17:58 PM +0530, Abdun Nihaal wrote:
> On Mon, Nov 17, 2025 at 07:00:42PM +0800, Jeff Chen wrote:
> > diff --git a/drivers/net/wireless/nxp/nxpwifi/main.c b/drivers/net/wireless/nxp/nxpwifi/main.c
> > +
> > +	adapter->workqueue =
> > +		alloc_workqueue("NXPWIFI_WORK_QUEUE",
> > +				WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 0);
> > +	if (!adapter->workqueue) {
> > +		ret = -ENOMEM;
> > +		goto err_kmalloc;
> > +	}
> > +
> > +	INIT_WORK(&adapter->main_work, nxpwifi_main_work);
> > +
> > +	if (adapter->rx_work_enabled) {
> > +		adapter->rx_workqueue = alloc_workqueue("NXPWIFI_RX_WORK_QUEUE",
> > +							WQ_HIGHPRI |
> > +							WQ_MEM_RECLAIM |
> > +							WQ_UNBOUND, 0);
> > +		if (!adapter->rx_workqueue) {
> > +			ret = -ENOMEM;
> > +			goto err_kmalloc;
> > +		}
> > +
> > +		INIT_WORK(&adapter->rx_work, nxpwifi_rx_work);
> > +	}
> 
> In nxpwifi_add_card(), if the allocation of rx_workqueue fails, then the
> adapter->workqueue is not freed in the error path. The function which
> frees the workqueues nxpwifi_terminate_workqueue() is on err_registerdev
> 
> Should one or both goto in the workqueue allocations error path jump to
> err_registerdev label instead of err_kmalloc?
> 
> > +err_registerdev:
> > +	set_bit(NXPWIFI_SURPRISE_REMOVED, &adapter->work_flags);
> > +	nxpwifi_terminate_workqueue(adapter);
> > +	if (adapter->hw_status == NXPWIFI_HW_STATUS_READY) {
> > +		pr_debug("info: %s: shutdown nxpwifi\n", __func__);
> > +		nxpwifi_shutdown_drv(adapter);
> > +		nxpwifi_free_cmd_buffers(adapter);
> > +	}
> > +err_kmalloc:
> > +	if (adapter->irq_wakeup >= 0)
> > +		device_init_wakeup(adapter->dev, false);
> > +	nxpwifi_free_adapter(adapter);
> > +
> > +err_init_sw:
> > +
> > +	return ret;
> > +}
> 
Hi Abdun,

Yes, good catch. This issue has been addressed in nxpwifi v8.
Thanks for pointing this out.
Jeff

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ