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: <ZcUOp60BX8njHQ4Q@smile.fi.intel.com>
Date: Thu, 8 Feb 2024 19:25:59 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: Yicong Yang <yangyicong@...wei.com>, gregkh@...uxfoundation.org,
	tony@...mide.com, linux-kernel@...r.kernel.org,
	linux-serial@...r.kernel.org, john.ogness@...utronix.de,
	tglx@...utronix.de, yangyicong@...ilicon.com, linuxarm@...wei.com,
	prime.zeng@...ilicon.com, jonathan.cameron@...wei.com,
	fanghao11@...wei.com
Subject: Re: [PATCH v3] serial: port: Don't suspend if the port is still busy

On Thu, Feb 08, 2024 at 09:27:57AM +0100, Jiri Slaby wrote:
> On 08. 02. 24, 8:52, Yicong Yang wrote:

..

> >   static int __serial_port_busy(struct uart_port *port)
> >   {
> > -	return !uart_tx_stopped(port) &&
> > -		uart_circ_chars_pending(&port->state->xmit);
> > +	if (uart_tx_stopped(port))
> > +		return 0;
> > +
> > +	if (uart_circ_chars_pending(&port->state->xmit))
> > +		return -EBUSY;
> 
> Why do you do this change at all? If anything, __serial_port_busy() should
> be made to return a bool and not to return an error. Look how it is named --
> returning EBUSY is sort of unexpected in my eyes. And if this needed to be
> done, it should have been in a separate patch anyway.

I proposed that with a renaming, so it won't look as boolean.
And I also implied (sorry if it was unclear) that this has to be
done separately, so we are on the same page about this.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ