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: <20200518091903.4rj5exdfrb53vfzz@wunner.de>
Date:   Mon, 18 May 2020 11:19:03 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Heiko Stübner <heiko@...ech.de>
Cc:     gregkh@...uxfoundation.org, jslaby@...e.com,
        andriy.shevchenko@...ux.intel.com, matwey.kornilov@...il.com,
        giulio.benetti@...ronovasrl.com, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        christoph.muellner@...obroma-systems.com
Subject: Re: [PATCH v3 3/5] serial: 8250: Support separate rs485 rx-enable
 GPIO

On Mon, May 18, 2020 at 10:04:05AM +0200, Heiko Stübner wrote:
> Am Montag, 18. Mai 2020, 06:50:06 CEST schrieb Lukas Wunner:
> > On Sun, May 17, 2020 at 11:56:08PM +0200, Heiko Stuebner wrote:
> > > @@ -1457,6 +1458,7 @@ void serial8250_em485_stop_tx(struct uart_8250_port *p)
> > >  	 * Enable previously disabled RX interrupts.
> > >  	 */
> > >  	if (!(p->port.rs485.flags & SER_RS485_RX_DURING_TX)) {
> > > +		gpiod_set_value(port->rs485_re_gpio, 1);
> > >  		serial8250_clear_and_reinit_fifos(p);
> > >  
> > >  		p->ier |= UART_IER_RLSI | UART_IER_RDI;
> > 
> > The added line needs to be conditional on if (port->rs485_re_gpio)
> > because the gpiod could be NULL and gpiod_set_value() doesn't check
> > for that.
> 
> Need to look deeper at the other comment below, but gpiod_set_value does
> check for NULL ;-)

I'll be damned.  That means I should respin my patch [4/4] and
drop the NULL check. :-/

Thanks!

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ