* [PATCH] serial: core: mark port as initialized in autoconfig
@ 2018-02-03 11:27 Sebastian Andrzej Siewior
2018-02-03 11:52 ` Nikola Ciprich
2018-02-04 1:02 ` Johan Hovold
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-02-03 11:27 UTC (permalink / raw)
To: linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby, Sebastian Andrzej Siewior,
Johan Hovold, Nikola Ciprich, stable
This is a followup on 44117a1d1732 ("serial: core: mark port as
initialized after successful IRQ change").
Nikola has been using autoconfig via setserial and reported a crash
similar to what I fixed in the earlier mentioned commit. Here I do the
same fixup for the autoconfig. I wasn't sure that this is the right
approach. Nikola confirmed that it fixes his crash.
Fixes: b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open")
Link: http://lkml.kernel.org/r/20180131072000.GD1853@localhost.localdomain
Reported-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Cc: Johan Hovold <johan@kernel.org>
Cc: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/tty/serial/serial_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index c8dde56b532b..35b9201db3b4 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1144,6 +1144,8 @@ static int uart_do_autoconfig(struct tty_struct *tty,struct uart_state *state)
uport->ops->config_port(uport, flags);
ret = uart_startup(tty, state, 1);
+ if (ret == 0)
+ tty_port_set_initialized(port, true);
if (ret > 0)
ret = 0;
}
--
2.15.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] serial: core: mark port as initialized in autoconfig
2018-02-03 11:27 [PATCH] serial: core: mark port as initialized in autoconfig Sebastian Andrzej Siewior
@ 2018-02-03 11:52 ` Nikola Ciprich
2018-02-04 1:02 ` Johan Hovold
1 sibling, 0 replies; 3+ messages in thread
From: Nikola Ciprich @ 2018-02-03 11:52 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-serial, Greg Kroah-Hartman, Jiri Slaby, Johan Hovold,
stable, Nikola Ciprich
[-- Attachment #1: Type: text/plain, Size: 55 bytes --]
Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: core: mark port as initialized in autoconfig
2018-02-03 11:27 [PATCH] serial: core: mark port as initialized in autoconfig Sebastian Andrzej Siewior
2018-02-03 11:52 ` Nikola Ciprich
@ 2018-02-04 1:02 ` Johan Hovold
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2018-02-04 1:02 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: linux-serial, Greg Kroah-Hartman, Jiri Slaby, Johan Hovold,
Nikola Ciprich, stable
On Sat, Feb 03, 2018 at 12:27:23PM +0100, Sebastian Andrzej Siewior wrote:
> This is a followup on 44117a1d1732 ("serial: core: mark port as
> initialized after successful IRQ change").
> Nikola has been using autoconfig via setserial and reported a crash
> similar to what I fixed in the earlier mentioned commit. Here I do the
> same fixup for the autoconfig. I wasn't sure that this is the right
> approach. Nikola confirmed that it fixes his crash.
>
> Fixes: b3b576461864 ("tty: serial_core: convert uart_open to use tty_port_open")
> Link: http://lkml.kernel.org/r/20180131072000.GD1853@localhost.localdomain
> Reported-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
> Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Johan Hovold <johan@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-04 1:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-03 11:27 [PATCH] serial: core: mark port as initialized in autoconfig Sebastian Andrzej Siewior
2018-02-03 11:52 ` Nikola Ciprich
2018-02-04 1:02 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox