Re: serial core: crash / race condition on unbind

2014-03-13 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 11:59 PM, Peter Hurley wrote: > On 03/11/2014 11:35 AM, Geert Uytterhoeven wrote: >> On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley >> wrote: >>> On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley wrote:

Re: serial core: crash / race condition on unbind

2014-03-13 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 11:59 PM, Peter Hurley pe...@hurleysoftware.com wrote: On 03/11/2014 11:35 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley pe...@hurleysoftware.com wrote: On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Peter Hurley
On 03/11/2014 11:35 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley wrote: On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley wrote: [...] /* * Indicate that there isn't a port

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley wrote: > On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: >> On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley >> wrote: [...] /* * Indicate that there isn't a port here anymore.

Re: serial core: crash / race condition on unbind

2014-03-11 Thread One Thousand Gnomes
> > No one unbinds serial drivers using serial_core, as all these drivers are > > for fixed hardware? > > Yep, never tested until now :) > Do you need this to work? > > > Hot-pluggable usb-serial doesn't use serial_core. > > I guess none of the 8250 PCI adapters are hot-pluggable... pcmcia

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Peter Hurley
On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: Hi Peter, On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley wrote: [...] /* * Indicate that there isn't a port here anymore. */ uport->type = PORT_UNKNOWN; state->uart_port = NULL;

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley wrote: >> >> [...] >> >> /* >> * Indicate that there isn't a port here anymore. >> */ >> uport->type = PORT_UNKNOWN; >> >> state->uart_port = NULL; > > How did this ever work? > >

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley pe...@hurleysoftware.com wrote: [...] /* * Indicate that there isn't a port here anymore. */ uport-type = PORT_UNKNOWN; state-uart_port = NULL; How did this ever work?

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Peter Hurley
On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: Hi Peter, On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley pe...@hurleysoftware.com wrote: [...] /* * Indicate that there isn't a port here anymore. */ uport-type = PORT_UNKNOWN;

Re: serial core: crash / race condition on unbind

2014-03-11 Thread One Thousand Gnomes
No one unbinds serial drivers using serial_core, as all these drivers are for fixed hardware? Yep, never tested until now :) Do you need this to work? Hot-pluggable usb-serial doesn't use serial_core. I guess none of the 8250 PCI adapters are hot-pluggable... pcmcia 8250 certainly

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Geert Uytterhoeven
Hi Peter, On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley pe...@hurleysoftware.com wrote: On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley pe...@hurleysoftware.com wrote: [...] /* * Indicate that there isn't a

Re: serial core: crash / race condition on unbind

2014-03-11 Thread Peter Hurley
On 03/11/2014 11:35 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 12:49 PM, Peter Hurley pe...@hurleysoftware.com wrote: On 03/11/2014 06:58 AM, Geert Uytterhoeven wrote: On Tue, Mar 11, 2014 at 4:14 AM, Peter Hurley pe...@hurleysoftware.com wrote: [...] /*

Re: serial core: crash / race condition on unbind

2014-03-10 Thread Peter Hurley
[ +cc Alan ] On 03/10/2014 04:48 PM, Geert Uytterhoeven wrote: On Fri, Mar 7, 2014 at 5:55 PM, Geert Uytterhoeven wrote: When unbinding a serial driver, uart_remove_one_port() clears uart_state.uart_port: state->uart_port = NULL; If the serial port is still in use (e.g. by getty),

Re: serial core: crash / race condition on unbind

2014-03-10 Thread Geert Uytterhoeven
On Fri, Mar 7, 2014 at 5:55 PM, Geert Uytterhoeven wrote: > When unbinding a serial driver, uart_remove_one_port() clears > uart_state.uart_port: > > state->uart_port = NULL; > > If the serial port is still in use (e.g. by getty), uart_close() will be > called later: After more digging

Re: serial core: crash / race condition on unbind

2014-03-10 Thread Geert Uytterhoeven
On Fri, Mar 7, 2014 at 5:55 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: When unbinding a serial driver, uart_remove_one_port() clears uart_state.uart_port: state-uart_port = NULL; If the serial port is still in use (e.g. by getty), uart_close() will be called later: After

Re: serial core: crash / race condition on unbind

2014-03-10 Thread Peter Hurley
[ +cc Alan ] On 03/10/2014 04:48 PM, Geert Uytterhoeven wrote: On Fri, Mar 7, 2014 at 5:55 PM, Geert Uytterhoeven ge...@linux-m68k.org wrote: When unbinding a serial driver, uart_remove_one_port() clears uart_state.uart_port: state-uart_port = NULL; If the serial port is still in

serial core: crash / race condition on unbind

2014-03-07 Thread Geert Uytterhoeven
When unbinding a serial driver, uart_remove_one_port() clears uart_state.uart_port: state->uart_port = NULL; If the serial port is still in use (e.g. by getty), uart_close() will be called later: static void uart_close(struct tty_struct *tty, struct file *filp) {

serial core: crash / race condition on unbind

2014-03-07 Thread Geert Uytterhoeven
When unbinding a serial driver, uart_remove_one_port() clears uart_state.uart_port: state-uart_port = NULL; If the serial port is still in use (e.g. by getty), uart_close() will be called later: static void uart_close(struct tty_struct *tty, struct file *filp) {