[ OK ] Started Getty on tty4. [ OK ] Started Getty on tty3. [ OK ] Started Getty on tty2. [ OK ] Started Serial Getty on ttyS0. [ OK ] Reached target Login Prompts. [ OK ] Started OpenBSD Secure Shell server. [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.227' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.355490] BUG: sleeping function called from invalid context at drivers/tty/vt/vt.c:2599 [ 33.363938] in_atomic(): 1, irqs_disabled(): 1, pid: 8093, name: syz-executor404 [ 33.371447] 3 locks held by syz-executor404/8093: [ 33.376263] #0: 0000000063ef4ac6 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 33.384741] #1: 00000000af96c4af (&(&tty->flow_lock)->rlock){....}, at: n_tty_ioctl_helper+0xcc/0x3a0 [ 33.394172] #2: 0000000063ef4ac6 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 [ 33.402212] irq event stamp: 8148 [ 33.405646] hardirqs last enabled at (8147): [] do_syscall_64+0x21/0x620 [ 33.414129] hardirqs last disabled at (8148): [] _raw_spin_lock_irq+0x35/0x80 [ 33.422961] softirqs last enabled at (6902): [] __do_softirq+0x678/0x980 [ 33.431441] softirqs last disabled at (6875): [] irq_exit+0x215/0x260 [ 33.439589] Preemption disabled at: [ 33.439595] [<0000000000000000>] (null) [ 33.448062] CPU: 0 PID: 8093 Comm: syz-executor404 Not tainted 4.19.211-syzkaller #0 [ 33.455930] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 33.465272] Call Trace: [ 33.467857] dump_stack+0x1fc/0x2ef [ 33.471470] ___might_sleep.cold+0x235/0x250 [ 33.475883] do_con_write+0x116/0x1d90 [ 33.479769] ? mark_held_locks+0xf0/0xf0 [ 33.483841] ? try_to_wake_up+0x733/0x1050 [ 33.488058] ? n_hdlc_buf_get+0x1ab/0x240 [ 33.492186] ? do_con_trol+0x5970/0x5970 [ 33.496226] ? lock_downgrade+0x720/0x720 [ 33.500356] ? lock_acquire+0x170/0x3c0 [ 33.504324] ? n_hdlc_buf_get+0x22/0x240 [ 33.508372] ? trace_hardirqs_off+0x64/0x200 [ 33.512777] ? con_put_char+0xe0/0xe0 [ 33.516564] con_write+0x22/0xb0 [ 33.519923] ? con_put_char+0xe0/0xe0 [ 33.523721] n_hdlc_send_frames+0x278/0x470 [ 33.528036] n_hdlc_tty_wakeup+0xa0/0xc0 [ 33.532080] ? n_hdlc_tty_open+0x510/0x510 [ 33.536293] tty_wakeup+0xd4/0x110 [ 33.539819] ? lf+0x2b0/0x2b0 [ 33.542903] __start_tty+0x116/0x150 [ 33.546600] n_tty_ioctl_helper+0x348/0x3a0 [ 33.550900] n_hdlc_tty_ioctl+0x102/0x350 [ 33.555028] tty_ioctl+0x65d/0x1630 [ 33.558634] ? n_hdlc_tty_wakeup+0xc0/0xc0 [ 33.562848] ? do_sys_open+0x2ba/0x520 [ 33.566718] ? tty_fasync+0x300/0x300 [ 33.570500] ? mark_held_locks+0xf0/0xf0 [ 33.574545] ? debug_check_no_obj_freed+0x201/0x490 [ 33.579544] ? lock_downgrade+0x720/0x720 [ 33.583674] ? lock_acquire+0x170/0x3c0 [ 33.587629] ? debug_check_no_obj_freed+0xb5/0x490 [ 33.592572] ? tty_fasync+0x300/0x300 [ 33.596354] do_vfs_ioctl+0xcdb/0x12e0 [ 33.600223] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 33.605303] ? debug_check_no_obj_freed+0x201/0x490 [ 33.610296] ? ioctl_preallocate+0x200/0x200 [ 33.614687] ? putname+0xe1/0x120 [ 33.618123] ? putname+0xe1/0x120 [ 33.621558] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 33.626554] ? kmem_cache_free+0x226/0x260 [ 33.630769] ? putname+0xe1/0x120 [ 33.634200] ? do_sys_open+0x2bf/0x520 [ 33.638066] ? filp_open+0x70/0x70 [ 33.641586] ksys_ioctl+0x9b/0xc0 [ 33.645022] __x64_sys_ioctl+0x6f/0xb0 [ 33.648890] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 33.653449] do_syscall_64+0xf9/0x620 [ 33.657232] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 33.662401] RIP: 0033:0x7fd9a050b489 [ 33.666096] 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.684976] RSP: 002b:00007ffca0cdf2c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 33.692664] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fd9a050b489 [ 33.699920] RDX: 0000000000000001 RSI: 000000000000540a RDI: 0000000000000008