INFO: task syz-executor0:28713 blocked for more than 120 seconds. Not tainted 4.17.0-rc6+ #62 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor0 D20536 28713 14835 0x80000002 Call Trace: context_switch kernel/sched/core.c:2859 [inline] __schedule+0x801/0x1e30 kernel/sched/core.c:3501 schedule+0xef/0x430 kernel/sched/core.c:3545 __rwsem_down_write_failed_common+0x919/0x15d0 kernel/locking/rwsem-xadd.c:565 rwsem_down_write_failed+0xe/0x10 kernel/locking/rwsem-xadd.c:594 call_rwsem_down_write_failed+0x17/0x30 arch/x86/lib/rwsem.S:117 __down_write arch/x86/include/asm/rwsem.h:142 [inline] down_write+0xa2/0x120 kernel/locking/rwsem.c:72 n_tty_flush_buffer+0x21/0x320 drivers/tty/n_tty.c:357 tty_ldisc_hangup+0x89/0x640 drivers/tty/tty_ldisc.c:724 __tty_hangup.part.21+0x2da/0x6e0 drivers/tty/tty_io.c:621 __tty_hangup drivers/tty/tty_io.c:571 [inline] tty_vhangup+0x21/0x30 drivers/tty/tty_io.c:694 pty_close+0x3bd/0x510 drivers/tty/pty.c:78 tty_release+0x494/0x12e0 drivers/tty/tty_io.c:1656 __fput+0x34d/0x890 fs/file_table.c:209 ____fput+0x15/0x20 fs/file_table.c:243 INFO: rcu_sched self-detected stall on CPU INFO: rcu_sched detected stalls on CPUs/tasks: 0-....: (125001 ticks this GP) idle=fce/1/4611686018427387906 softirq=116590/116590 fqs=31171 0-....: (125001 ticks this GP) idle=fce/1/4611686018427387906 softirq=116590/116590 fqs=31171 (t=125004 jiffies g=63518 c=63517 q=232) (detected by 1, t=125004 jiffies, g=63518, c=63517, q=232) NMI backtrace for cpu 0 CPU: 0 PID: 6 Comm: kworker/u4:0 Not tainted 4.17.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 nmi_cpu_backtrace.cold.4+0x19/0xce lib/nmi_backtrace.c:103 nmi_trigger_cpumask_backtrace+0x151/0x192 lib/nmi_backtrace.c:62 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38 trigger_single_cpu_backtrace include/linux/nmi.h:156 [inline] rcu_dump_cpu_stacks+0x175/0x1c2 kernel/rcu/tree.c:1376 print_cpu_stall kernel/rcu/tree.c:1525 [inline] check_cpu_stall.isra.61.cold.80+0x36c/0x59a kernel/rcu/tree.c:1593 __rcu_pending kernel/rcu/tree.c:3356 [inline] rcu_pending kernel/rcu/tree.c:3401 [inline] rcu_check_callbacks+0x21b/0xad0 kernel/rcu/tree.c:2763 update_process_times+0x2d/0x70 kernel/time/timer.c:1636 tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:164 tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1274 __run_hrtimer kernel/time/hrtimer.c:1398 [inline] __hrtimer_run_queues+0x3e3/0x10a0 kernel/time/hrtimer.c:1460 hrtimer_interrupt+0x2f3/0x750 kernel/time/hrtimer.c:1518 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline] smp_apic_timer_interrupt+0x15d/0x710 arch/x86/kernel/apic/apic.c:1050 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 RIP: 0010:write_comp_data+0x1/0x70 kernel/kcov.c:116 RSP: 0018:ffff8801d9a97248 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 000000027d92b6c4 RCX: ffffffff8397bc09 RDX: 0000000000000000 RSI: 0000000000000082 RDI: 0000000000000001 RBP: ffff8801d9a97258 R08: ffff8801d9a88180 R09: 0000000000000006 R10: ffff8801d9a88180 R11: 0000000000000000 R12: ffffc900035d7000 R13: 0000000000000900 R14: 0000000000000000 R15: 00000000000000ff __process_echoes+0x249/0x8d0 drivers/tty/n_tty.c:733 commit_echoes+0x163/0x1d0 drivers/tty/n_tty.c:764 n_tty_receive_char_fast drivers/tty/n_tty.c:1416 [inline] n_tty_receive_buf_fast drivers/tty/n_tty.c:1576 [inline] __receive_buf drivers/tty/n_tty.c:1611 [inline] n_tty_receive_buf_common+0x2048/0x2c50 drivers/tty/n_tty.c:1709 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1744 tty_ldisc_receive_buf+0xb0/0x190 drivers/tty/tty_buffer.c:456 tty_port_default_receive_buf+0x110/0x170 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x3e9/0x560 drivers/tty/tty_buffer.c:524 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 6 Comm: kworker/u4:0 Not tainted 4.17.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc RIP: 0010:rep_nop arch/x86/include/asm/processor.h:667 [inline] RIP: 0010:cpu_relax arch/x86/include/asm/processor.h:672 [inline] RIP: 0010:virt_spin_lock arch/x86/include/asm/qspinlock.h:69 [inline] RIP: 0010:native_queued_spin_lock_slowpath+0x204/0xde0 kernel/locking/qspinlock.c:305 RSP: 0018:ffff8801dae070a0 EFLAGS: 00000002 RAX: 0000000000000000 RBX: ffffed003b5c0e2d RCX: 0000000000000004 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff88d91280 RBP: ffff8801dae07410 R08: fffffbfff11b2251 R09: fffffbfff11b2250 R10: fffffbfff11b2250 R11: ffffffff88d91283 R12: ffffffff88d91280 R13: ffff8801dae073e8 R14: 0000000000000001 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3c27785000 CR3: 0000000008c6a000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:674 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:30 [inline] queued_spin_lock include/asm-generic/qspinlock.h:90 [inline] do_raw_spin_lock+0x1a7/0x200 kernel/locking/spinlock_debug.c:113 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x9e/0xc0 kernel/locking/spinlock.c:152 print_cpu_stall kernel/rcu/tree.c:1527 [inline] check_cpu_stall.isra.61.cold.80+0x374/0x59a kernel/rcu/tree.c:1593 __rcu_pending kernel/rcu/tree.c:3356 [inline] rcu_pending kernel/rcu/tree.c:3401 [inline] rcu_check_callbacks+0x21b/0xad0 kernel/rcu/tree.c:2763 update_process_times+0x2d/0x70 kernel/time/timer.c:1636 tick_sched_handle+0x9f/0x180 kernel/time/tick-sched.c:164 tick_sched_timer+0x45/0x130 kernel/time/tick-sched.c:1274 __run_hrtimer kernel/time/hrtimer.c:1398 [inline] __hrtimer_run_queues+0x3e3/0x10a0 kernel/time/hrtimer.c:1460 hrtimer_interrupt+0x2f3/0x750 kernel/time/hrtimer.c:1518 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline] smp_apic_timer_interrupt+0x15d/0x710 arch/x86/kernel/apic/apic.c:1050 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:863 RIP: 0010:write_comp_data+0x1/0x70 kernel/kcov.c:116 RSP: 0018:ffff8801d9a97248 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 000000027d92b6c4 RCX: ffffffff8397bc09 RDX: 0000000000000000 RSI: 0000000000000082 RDI: 0000000000000001 RBP: ffff8801d9a97258 R08: ffff8801d9a88180 R09: 0000000000000006 R10: ffff8801d9a88180 R11: 0000000000000000 R12: ffffc900035d7000 R13: 0000000000000900 R14: 0000000000000000 R15: 00000000000000ff __process_echoes+0x249/0x8d0 drivers/tty/n_tty.c:733 commit_echoes+0x163/0x1d0 drivers/tty/n_tty.c:764 n_tty_receive_char_fast drivers/tty/n_tty.c:1416 [inline] n_tty_receive_buf_fast drivers/tty/n_tty.c:1576 [inline] __receive_buf drivers/tty/n_tty.c:1611 [inline] n_tty_receive_buf_common+0x2048/0x2c50 drivers/tty/n_tty.c:1709 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1744 tty_ldisc_receive_buf+0xb0/0x190 drivers/tty/tty_buffer.c:456 tty_port_default_receive_buf+0x110/0x170 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x3e9/0x560 drivers/tty/tty_buffer.c:524 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Code: 5c 00 00 00 00 48 83 e7 f8 49 29 fc 41 8d 4c 24 64 c1 e9 03 f3 48 ab 48 81 c4 48 03 00 00 5b 41 5c 41 5d 41 5e 41 5f 5d c3 f3 90 3b ff ff ff 89 f1 81 fe 00 01 00 00 0f 84 9e 03 00 00 41 be task_work_run+0x1e4/0x290 kernel/task_work.c:113 INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.532 msecs exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x1aee/0x2730 kernel/exit.c:865 do_group_exit+0x16f/0x430 kernel/exit.c:968 get_signal+0x886/0x1960 kernel/signal.c:2482 do_signal+0x98/0x2040 arch/x86/kernel/signal.c:810 exit_to_usermode_loop+0x28a/0x310 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline] syscall_return_slowpath arch/x86/entry/common.c:265 [inline] do_syscall_64+0x6ac/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455a09 RSP: 002b:00007fba2280fc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: 0000000000002e00 RBX: 00007fba228106d4 RCX: 0000000000455a09 RDX: 00000000ffffff0b RSI: 0000000020c34fff RDI: 0000000000000015 RBP: 000000000072bf50 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000077b R14: 00000000006ff428 R15: 0000000000000001 Showing all locks held in the system: 2 locks held by khungtaskd/892: #0: 000000008a2f8060 (rcu_read_lock){....}, at: check_hung_uninterruptible_tasks kernel/hung_task.c:175 [inline] #0: 000000008a2f8060 (rcu_read_lock){....}, at: watchdog+0x1ff/0xf60 kernel/hung_task.c:249 #1: 00000000273f47c9 (tasklist_lock){.+.+}, at: debug_show_all_locks+0xde/0x34a kernel/locking/lockdep.c:4470 2 locks held by getty/4478: #0: 0000000002bda0da (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000fe10eeb9 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4479: #0: 00000000ca3ac19a (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 0000000030c605d0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4480: #0: 0000000067963e82 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000eeb0df65 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4481: #0: 00000000bf6554c6 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000005b69fb96 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4482: #0: 00000000fe2fb5ec (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 000000000675e123 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4483: #0: 00000000d1225887 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000cd840d74 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 2 locks held by getty/4484: #0: 0000000018d820a5 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x37/0x40 drivers/tty/tty_ldsem.c:365 #1: 00000000d9a31e0d (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x321/0x1cc0 drivers/tty/n_tty.c:2131 4 locks held by syz-executor0/28713: #0: 00000000d5927a0a (&tty->legacy_mutex){+.+.}, at: tty_lock+0x70/0xa0 drivers/tty/tty_mutex.c:19 #1: 00000000e7ab8deb (&tty->legacy_mutex/1){+.+.}, at: tty_lock+0x70/0xa0 drivers/tty/tty_mutex.c:19 #2: 00000000e8887771 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x22/0x90 drivers/tty/tty_ldisc.c:297 #3: 00000000b9344532 (&o_tty->termios_rwsem/1){++++}, at: n_tty_flush_buffer+0x21/0x320 drivers/tty/n_tty.c:357 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 892 Comm: khungtaskd Not tainted 4.17.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 nmi_cpu_backtrace.cold.4+0x19/0xce lib/nmi_backtrace.c:103 nmi_trigger_cpumask_backtrace+0x151/0x192 lib/nmi_backtrace.c:62 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38 trigger_all_cpu_backtrace include/linux/nmi.h:138 [inline] check_hung_task kernel/hung_task.c:132 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:190 [inline] watchdog+0xc10/0xf60 kernel/hung_task.c:249 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 6 Comm: kworker/u4:0 Not tainted 4.17.0-rc6+ #62 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events_unbound flush_to_ldisc RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline] RIP: 0010:write_comp_data+0xa/0x70 kernel/kcov.c:121 RSP: 0018:ffff8801d9a97248 EFLAGS: 00000293 RAX: ffff8801d9a88180 RBX: 000000028271e93c RCX: ffffffff8397bc37 RDX: fffffffd7d8e1fc4 RSI: 0000000000000edf RDI: 0000000000000007 RBP: ffff8801d9a97258 R08: ffff8801d9a88180 R09: 0000000000000006 R10: ffff8801d9a88180 R11: 0000000000000000 R12: ffffc900035d7000 R13: 0000000000000900 R14: fffffffd7d8e1fc4 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3c27785000 CR3: 0000000008c6a000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __process_echoes+0x277/0x8d0 drivers/tty/n_tty.c:731 commit_echoes+0x163/0x1d0 drivers/tty/n_tty.c:764 n_tty_receive_char_fast drivers/tty/n_tty.c:1416 [inline] n_tty_receive_buf_fast drivers/tty/n_tty.c:1576 [inline] __receive_buf drivers/tty/n_tty.c:1611 [inline] n_tty_receive_buf_common+0x2048/0x2c50 drivers/tty/n_tty.c:1709 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1744 tty_ldisc_receive_buf+0xb0/0x190 drivers/tty/tty_buffer.c:456 tty_port_default_receive_buf+0x110/0x170 drivers/tty/tty_port.c:38 receive_buf drivers/tty/tty_buffer.c:475 [inline] flush_to_ldisc+0x3e9/0x560 drivers/tty/tty_buffer.c:524 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:240 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Code: ff ff 48 8b bd d0 fe ff ff e8 f3 6d 3c 00 e9 bd fc ff ff 4c 89 ef e8 46 6d 3c 00 e9 86 fc ff ff 90 55 65 4c 8b 04 25 c0 ed 01 00 <65> 8b 05 8f bd 88 7e 48 89 e5 a9 00 01 1f 00 75 51 41 8b 80 78