Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.197' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.023700] BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2582 [ 33.032680] in_atomic(): 1, irqs_disabled(): 1, pid: 8076, name: syz-executor696 [ 33.040399] 3 locks held by syz-executor696/8076: [ 33.045224] #0: 000000009a053c3a (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 33.053718] #1: 000000008bc7b46a (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 [ 33.063162] #2: 000000009a053c3a (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 [ 33.071402] irq event stamp: 6828 [ 33.074843] hardirqs last enabled at (6827): [] _raw_spin_unlock_irqrestore+0x79/0xe0 [ 33.084447] hardirqs last disabled at (6828): [] _raw_spin_lock_irq+0x35/0x80 [ 33.093267] softirqs last enabled at (6572): [] peernet2id+0x8f/0xc0 [ 33.101390] softirqs last disabled at (6570): [] peernet2id+0x6f/0xc0 [ 33.109593] Preemption disabled at: [ 33.109598] [<0000000000000000>] (null) [ 33.118109] CPU: 0 PID: 8076 Comm: syz-executor696 Not tainted 4.19.195-syzkaller #0 [ 33.125966] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.135298] Call Trace: [ 33.137871] dump_stack+0x1fc/0x2ef [ 33.141495] ___might_sleep.cold+0x235/0x250 [ 33.145912] do_con_write+0x116/0x1d90 [ 33.150059] ? mark_held_locks+0xf0/0xf0 [ 33.154124] ? try_to_wake_up+0x733/0x1050 [ 33.158358] ? n_hdlc_buf_get+0x1ab/0x240 [ 33.162492] ? do_con_trol+0x5970/0x5970 [ 33.166532] ? lock_downgrade+0x720/0x720 [ 33.170659] ? lock_acquire+0x170/0x3c0 [ 33.174627] ? n_hdlc_buf_get+0x22/0x240 [ 33.178685] ? trace_hardirqs_off+0x64/0x200 [ 33.183080] ? con_put_char+0xe0/0xe0 [ 33.186882] con_write+0x22/0xb0 [ 33.190241] ? con_put_char+0xe0/0xe0 [ 33.194028] n_hdlc_send_frames+0x278/0x470 [ 33.198342] n_hdlc_tty_wakeup+0xa0/0xc0 [ 33.202388] ? n_hdlc_tty_open+0x510/0x510 [ 33.206616] tty_wakeup+0xd4/0x110 [ 33.210244] ? lf+0x2b0/0x2b0 [ 33.213434] __start_tty+0x116/0x150 [ 33.217154] n_tty_ioctl_helper+0x348/0x3a0 [ 33.221464] n_hdlc_tty_ioctl+0x102/0x350 [ 33.225774] tty_ioctl+0x65d/0x15c0 [ 33.229384] ? n_hdlc_tty_wakeup+0xc0/0xc0 [ 33.233600] ? tty_fasync+0x300/0x300 [ 33.238090] ? ldsem_up_read+0x45/0x80 [ 33.242005] ? tty_write+0x561/0x810 [ 33.245718] ? n_hdlc_tty_poll+0x360/0x360 [ 33.249985] ? __vfs_write+0xff/0x770 [ 33.253808] ? tty_compat_ioctl+0x270/0x270 [ 33.258116] ? common_file_perm+0x4e5/0x850 [ 33.262424] ? tty_fasync+0x300/0x300 [ 33.266207] do_vfs_ioctl+0xcdb/0x12e0 [ 33.270081] ? ioctl_preallocate+0x200/0x200 [ 33.274487] ? fsnotify_first_mark+0x200/0x200 [ 33.279058] ? security_file_permission+0x1c0/0x220 [ 33.284056] ? vfs_write+0x393/0x540 [ 33.288014] ? ksys_write+0x1c8/0x2a0 [ 33.291796] ksys_ioctl+0x9b/0xc0 [ 33.295242] __x64_sys_ioctl+0x6f/0xb0 [ 33.299125] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 33.303694] do_syscall_64+0xf9/0x620 [ 33.307481] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.312663] RIP: 0033:0x43f159 [ 33.315837] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 33.334745] RSP: 002b:00007ffd9cd04eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 33.342439] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043f159 [ 33.349707] RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000003 [ 33.356955] RBP: 0000000000402fe0 R08: 0000000000400488 R09: 0000000000400488 [ 33.364474] R10: 0000000000400488 R11: 0000000000000246 R12: 0000000000403070 [ 33.371854] R13: 0000000000000000 R14: