patch "Revert "tty: Fix ldisc crash on reopened tty"" added to tty-next
Quoted 10 lines · Michael Neuling
Quoted 2 lines · Mikulas Patocka
With that patch reverted, I'm still getting this crash. Will there be another fix for this bug?
Yeah, this patch was trying to fix the issue.
Is this crash parisc? We are seeing it on powerpc although I'm having issues reproducing it reliably.
Mikey
Yes, it's parisc.
I can reproduce this crash reliably with the old Debian 5 installation when I connect to the machine with ssh and type something before the prompt appears.
You can try to install Debian 5 on powerpc and maybe then you can reproduce it the same way.
Mikulas
Quoted 116 lines
Quoted 115 lines
Kernel Fault: Code=15 (Data TLB miss fault) regs=000000007ace4740 (Addr=0000000000002260)
CPU: 0 PID: 24563 Comm: kworker/u8:1 Not tainted 4.11.0-rc4 #1 Workqueue: events_unbound flush_to_ldisctask:
000000007ae39b00task.stack:000000007ace4000YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00001000000001000000000000001111 Not tainted
r00-03000000000804000f00000000405b68c000000000403d35e00000000000000001 r04-0700000000405948c0000000007ac14c00000000007ace44100000000000000000 r08-11 0000000000000002000000007ac16c2a000000000000000000000000405a40c0r12-1500000000405a40c000000000406b2880000000007ace42c0000000007fc0c020r16-19000000007fc0c07800000000406b2880000000007fc0c2a80000000000002260 r20-23000000007ac14df0000000007ac14cc80000000000000001 0000000000000002 r24-27 0000000000000000000000000800000f000000007ac14cc400000000405948c0r28-31 0000000000000001000000007ace4850000000007ace47400000000000000001 sr00-03 0000000000290000 0000000000000000 0000000000000000 0000000000290000 sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000IASQ: 0000000000000000 0000000000000000 IAOQ:
00000000403d35fc00000000403d3600
IIR: 0e6a00d6 ISR: 0000000000000000 IOR: 0000000000002260 CPU: 0 CR30:000000007ace4000CR31: ffffffffffffffff
ORIG_R28:00000000405948c0
IAOQ[0]:n_tty_receive_buf_common+0xac/0xd20IAOQ[1]:n_tty_receive_buf_common+0xb0/0xd20RP(r2):n_tty_receive_buf_common+0x90/0xd20Backtrace: [<00000000403d4284>] n_tty_receive_buf2+0x14/0x20 [<00000000403d7980>] tty_ldisc_receive_buf+0x30/0x88 [<00000000403d88d4>] tty_port_default_receive_buf+0x5c/0xa8 [<00000000403d7c84>] flush_to_ldisc+0x10c/0x128 [<0000000040188740>] process_one_work+0x1b0/0x4e8 [<0000000040188d7c>] worker_thread+0x304/0x698 [<0000000040190c34>] kthread+0x17c/0x1d8 [<0000000040134020>] end_fault_vector+0x20/0x28 [<00000000401bdbd8>] handle_irq_event_percpu+0x70/0x90 [<00000000401b546c>] up_read+0x14/0x20 [<0000000040217ce8>] free_hot_cold_page_list+0x48/0x80 [<0000000040221644>] release_pages+0x3a4/0x478 Kernel panic - not syncing: Kernel FaultRebooting in 1 seconds..
Quoted 67 lines · On Wed, 29 Mar 2017, [email protected] wrote:
This is a note to let you know that I've just added the patch titled
Revert "tty: Fix ldisc crash on reopened tty"
to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.Quoted 1 line
From
896d81fefe5d1919537db2c2150ab6384e4a6610Mon Sep 17 00:00:00 2001From: Greg Kroah-Hartman <[email protected]>
Date: Wed, 29 Mar 2017 07:50:49 +0200
Subject: Revert "tty: Fix ldisc crash on reopened tty"
This reverts commit 71472fa9c52b1da27663c275d416d8654b905f05. It caused merge issues, and Dmitry found some review issues.Reported-by Dmitry Vyukov <[email protected]>Reported-by Stephen Rothwell <[email protected]>Cc Mikulas Patocka <[email protected]>Cc Peter Hurley <[email protected]>Cc Michael Neuling <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>---
drivers/tty/tty_ldisc.c| 11 +++++------1 file changed, 5 insertions(+), 6 deletions(-)drivers/tty/tty_ldisc.c +0
-0@@ -669,17 +669,16 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc) tty_ldisc_put(tty->ldisc); }
+ /* switch the line discipline */
+ tty->ldisc = ld;
tty_set_termios_ldisc(tty, disc);
- retval =tty_ldisc_open(tty, ld);
+ retval =tty_ldisc_open(tty, tty->ldisc);
if (retval) {
if (!WARN_ON(disc ==N_TTY)) {
- tty_ldisc_put(ld);
- ld = NULL;
+ tty_ldisc_put(tty->ldisc);
+ tty->ldisc = NULL;
}
}
-
- /* switch the line discipline */
- smp_store_release(&tty->ldisc, ld);
return retval;
}
--
2.12.1