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] [day] [month] [year] [list]
Message-ID: <fa3283276fcc9e9795989b49bab21a9a4217582c.camel@sipsolutions.net>
Date: Wed, 01 Oct 2025 12:19:22 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Jeff Chen <jeff.chen_1@....com>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org, 
	briannorris@...omium.org, francesco@...cini.it, tsung-hsien.hsieh@....com, 
	s.hauer@...gutronix.de, brian.hsu@....com
Subject: Re: [PATCH v5 18/22] wifi: nxpwifi: add core files

On Wed, 2025-10-01 at 18:17 +0800, Jeff Chen wrote:
> On Sat, Sep 20, 2025 at 02:06:17 AM +0800, Jeff Chen wrote:
> > On Thu, Sep 04, 2025 at 01:37:20 PM +0200, Johannes Berg wrote:
> > > On Mon, 2025-08-04 at 23:40 +0800, Jeff Chen wrote:
> > > > 
> > > > +/* The main process.
> > > > + *
> > > > + * This function is the main procedure of the driver and handles various driver
> > > > + * operations. It runs in a loop and provides the core functionalities.
> > > > + *
> > > > + * The main responsibilities of this function are -
> > > > + *      - Ensure concurrency control
> > > > + *      - Handle pending interrupts and call interrupt handlers
> > > > + *      - Wake up the card if required
> > > > + *      - Handle command responses and call response handlers
> > > > + *      - Handle events and call event handlers
> > > > + *      - Execute pending commands
> > > > + *      - Transmit pending data packets
> > > > + */
> > > > +void nxpwifi_main_process(struct nxpwifi_adapter *adapter)
> > > > +{
> > > > +	unsigned long flags;
> > > > +
> > > > +	spin_lock_irqsave(&adapter->main_proc_lock, flags);
> > > > +
> > > > +	/* Check if already processing */
> > > > +	if (adapter->nxpwifi_processing || adapter->main_locked) {
> > > > +		adapter->more_task_flag = true;
> > > > +		spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
> > > > +		return;
> > > > +	}
> > > > +
> > > > +	adapter->nxpwifi_processing = true;
> > > > +	spin_unlock_irqrestore(&adapter->main_proc_lock, flags);
> > > 
> > > 
> > > This makes me very nervous, it at least means it's super hard to
> > > understand when this may or may not be running ... It's also the sort of
> > > custom locking that's kind of frowned upon.
> 
> Hi Johannes, may I have your thoughts on the proposed plan to remove
> custom locking and rely on workqueue.

Oh sorry, I didn't realize you were expecting a response.

FWIW, that all sounds good to me.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ