Warning: Permanently added '10.128.0.255' (ECDSA) to the list of known hosts. syzkaller login: [ 35.416991] FAULT_INJECTION: forcing a failure. [ 35.416991] name failslab, interval 1, probability 0, space 0, times 1 [ 35.428990] CPU: 1 PID: 8121 Comm: syz-executor410 Not tainted 4.19.211-syzkaller #0 [ 35.436855] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 35.446191] Call Trace: [ 35.448758] dump_stack+0x1fc/0x2ef [ 35.452365] should_fail.cold+0xa/0xf [ 35.456142] ? setup_fault_attr+0x200/0x200 [ 35.460455] ? mark_held_locks+0xf0/0xf0 [ 35.464502] ? mark_held_locks+0xf0/0xf0 [ 35.468545] __should_failslab+0x115/0x180 [ 35.472770] should_failslab+0x5/0x10 [ 35.476549] __kmalloc+0x6d/0x3c0 [ 35.479988] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.484290] tty_buffer_alloc+0x23f/0x2a0 [ 35.488431] __tty_buffer_request_room+0x156/0x2a0 [ 35.493341] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.498872] ? do_raw_spin_lock+0xcb/0x220 [ 35.503098] pty_write+0x126/0x1f0 [ 35.506620] tty_put_char+0x122/0x150 [ 35.510400] ? dev_match_devt+0x90/0x90 [ 35.514364] ? tty_buffer_space_avail+0x7e/0xb0 [ 35.519010] ? pty_write_room+0xbe/0xe0 [ 35.522961] ? ptmx_open+0x350/0x350 [ 35.526651] __process_echoes+0x577/0x9f0 [ 35.530793] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.535701] ? n_tty_receive_buf2+0x40/0x40 [ 35.540001] tty_ioctl+0x1026/0x1630 [ 35.543694] ? tty_fasync+0x300/0x300 [ 35.547475] ? get_pid_task+0xf4/0x190 [ 35.551345] ? proc_fail_nth_write+0x95/0x1d0 [ 35.555820] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.560743] ? debug_check_no_obj_freed+0x201/0x490 [ 35.565749] ? __vfs_write+0xff/0x770 [ 35.569530] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.574439] ? common_file_perm+0x4e5/0x850 [ 35.578754] ? tty_fasync+0x300/0x300 [ 35.582551] do_vfs_ioctl+0xcdb/0x12e0 [ 35.586417] ? vfs_write+0x3d7/0x540 [ 35.590108] ? ioctl_preallocate+0x200/0x200 [ 35.594502] ? lock_downgrade+0x720/0x720 [ 35.598642] ? check_preemption_disabled+0x41/0x280 [ 35.603634] ? vfs_write+0x393/0x540 [ 35.607333] ? ksys_write+0x1c8/0x2a0 [ 35.611110] ksys_ioctl+0x9b/0xc0 [ 35.614552] __x64_sys_ioctl+0x6f/0xb0 [ 35.618424] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.622988] do_syscall_64+0xf9/0x620 [ 35.626768] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.631938] RIP: 0033:0x7f8e1e1e2789 [ 35.635630] 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 [ 35.654598] RSP: 002b:00007ffeeef53ad8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.662281] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8e1e1e2789 [ 35.669530] RDX: 0000000020000180 RSI: 0000000000005412 RDI: 0000000000000004 [ 35.676777] RBP: 00007ffeeef53af0 R08: 0000000000000001 R09: 0000000000000001 [ 35.684034] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 35.691282] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 35.698539] [ 35.698542] ====================================================== [ 35.698544] WARNING: possible circular locking dependency detected [ 35.698546] 4.19.211-syzkaller #0 Not tainted [ 35.698549] ------------------------------------------------------ [ 35.698551] syz-executor410/8121 is trying to acquire lock: [ 35.698553] 0000000035372a02 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 35.698559] [ 35.698561] but task is already holding lock: [ 35.698563] 0000000067ae9b4e (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.698569] [ 35.698571] which lock already depends on the new lock. [ 35.698572] [ 35.698573] [ 35.698576] the existing dependency chain (in reverse order) is: [ 35.698577] [ 35.698578] -> #2 (&(&port->lock)->rlock){-.-.}: [ 35.698584] tty_port_tty_get+0x1d/0x80 [ 35.698586] tty_port_default_wakeup+0x11/0x40 [ 35.698588] serial8250_tx_chars+0x490/0xaf0 [ 35.698591] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 35.698593] serial8250_default_handle_irq+0xae/0x220 [ 35.698595] serial8250_interrupt+0x101/0x240 [ 35.698597] __handle_irq_event_percpu+0x27e/0x8e0 [ 35.698599] handle_irq_event+0x102/0x290 [ 35.698601] handle_edge_irq+0x260/0xcf0 [ 35.698602] handle_irq+0x35/0x50 [ 35.698604] do_IRQ+0x93/0x1c0 [ 35.698606] ret_from_intr+0x0/0x1e [ 35.698608] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 35.698609] uart_write+0x3bb/0x6f0 [ 35.698611] do_output_char+0x5de/0x850 [ 35.698613] n_tty_write+0x46e/0xff0 [ 35.698615] tty_write+0x496/0x810 [ 35.698617] redirected_tty_write+0xaa/0xb0 [ 35.698618] do_iter_write+0x461/0x5d0 [ 35.698620] vfs_writev+0x153/0x2e0 [ 35.698622] do_writev+0x136/0x330 [ 35.698624] do_syscall_64+0xf9/0x620 [ 35.698626] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.698627] [ 35.698628] -> #1 (&port_lock_key){-.-.}: [ 35.698634] serial8250_console_write+0x90e/0xb70 [ 35.698636] console_unlock+0xbb6/0x1110 [ 35.698638] vprintk_emit+0x2d1/0x740 [ 35.698640] vprintk_func+0x79/0x180 [ 35.698641] printk+0xba/0xed [ 35.698643] register_console+0x87f/0xc90 [ 35.698645] univ8250_console_init+0x3a/0x46 [ 35.698647] console_init+0x4cb/0x718 [ 35.698649] start_kernel+0x686/0x911 [ 35.698651] secondary_startup_64+0xa4/0xb0 [ 35.698652] [ 35.698653] -> #0 (console_owner){....}: [ 35.698659] console_unlock+0x411/0x1110 [ 35.698661] vprintk_emit+0x2d1/0x740 [ 35.698663] vprintk_func+0x79/0x180 [ 35.698664] printk+0xba/0xed [ 35.698666] should_fail+0x66b/0x7b0 [ 35.698668] __should_failslab+0x115/0x180 [ 35.698670] should_failslab+0x5/0x10 [ 35.698671] __kmalloc+0x6d/0x3c0 [ 35.698673] tty_buffer_alloc+0x23f/0x2a0 [ 35.698675] __tty_buffer_request_room+0x156/0x2a0 [ 35.698678] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.698679] pty_write+0x126/0x1f0 [ 35.698698] tty_put_char+0x122/0x150 [ 35.698700] __process_echoes+0x577/0x9f0 [ 35.698703] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.698704] tty_ioctl+0x1026/0x1630 [ 35.698706] do_vfs_ioctl+0xcdb/0x12e0 [ 35.698708] ksys_ioctl+0x9b/0xc0 [ 35.698710] __x64_sys_ioctl+0x6f/0xb0 [ 35.698712] do_syscall_64+0xf9/0x620 [ 35.698714] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.698715] [ 35.698718] other info that might help us debug this: [ 35.698719] [ 35.698720] Chain exists of: [ 35.698721] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 35.698730] [ 35.698732] Possible unsafe locking scenario: [ 35.698733] [ 35.698735] CPU0 CPU1 [ 35.698737] ---- ---- [ 35.698738] lock(&(&port->lock)->rlock); [ 35.698743] lock(&port_lock_key); [ 35.698748] lock(&(&port->lock)->rlock); [ 35.698752] lock(console_owner); [ 35.698755] [ 35.698757] *** DEADLOCK *** [ 35.698758] [ 35.698760] 6 locks held by syz-executor410/8121: [ 35.698761] #0: 000000005bcd3b41 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 35.698769] #1: 000000009766fce1 (&port->buf.lock/1){+.+.}, at: tty_ioctl+0xfbc/0x1630 [ 35.698778] #2: 00000000dbce75ce (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0x84/0x2a90 [ 35.698788] #3: 000000004d2e2873 (&ldata->output_lock){+.+.}, at: n_tty_receive_buf_common+0xbce/0x2a90 [ 35.698797] #4: 0000000067ae9b4e (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.698805] #5: 000000004d6960a1 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 35.698812] [ 35.698814] stack backtrace: [ 35.698817] CPU: 1 PID: 8121 Comm: syz-executor410 Not tainted 4.19.211-syzkaller #0 [ 35.698821] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 35.698822] Call Trace: [ 35.698824] dump_stack+0x1fc/0x2ef [ 35.698827] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.698829] __lock_acquire+0x30c9/0x3ff0 [ 35.698831] ? mark_held_locks+0xf0/0xf0 [ 35.698833] ? snprintf+0xf0/0xf0 [ 35.698835] ? console_unlock+0x3ec/0x1110 [ 35.698837] lock_acquire+0x170/0x3c0 [ 35.698839] ? console_unlock+0x3a9/0x1110 [ 35.698840] console_unlock+0x411/0x1110 [ 35.698843] ? console_unlock+0x3a9/0x1110 [ 35.698844] vprintk_emit+0x2d1/0x740 [ 35.698846] vprintk_func+0x79/0x180 [ 35.698848] printk+0xba/0xed [ 35.698850] ? log_store.cold+0x16/0x16 [ 35.698852] ? __lock_acquire+0x22f9/0x3ff0 [ 35.698854] ? ___ratelimit+0x319/0x590 [ 35.698856] should_fail+0x66b/0x7b0 [ 35.698858] ? setup_fault_attr+0x200/0x200 [ 35.698860] ? mark_held_locks+0xf0/0xf0 [ 35.698862] ? mark_held_locks+0xf0/0xf0 [ 35.698864] __should_failslab+0x115/0x180 [ 35.698866] should_failslab+0x5/0x10 [ 35.698867] __kmalloc+0x6d/0x3c0 [ 35.698869] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.698871] tty_buffer_alloc+0x23f/0x2a0 [ 35.698874] __tty_buffer_request_room+0x156/0x2a0 [ 35.698876] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.698878] ? do_raw_spin_lock+0xcb/0x220 [ 35.698880] pty_write+0x126/0x1f0 [ 35.698882] tty_put_char+0x122/0x150 [ 35.698884] ? dev_match_devt+0x90/0x90 [ 35.698886] ? tty_buffer_space_avail+0x7e/0xb0 [ 35.698888] ? pty_write_room+0xbe/0xe0 [ 35.698890] ? ptmx_open+0x350/0x350 [ 35.698892] __process_echoes+0x577/0x9f0 [ 35.698894] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.698896] ? n_tty_receive_buf2+0x40/0x40 [ 35.698898] tty_ioctl+0x1026/0x1630 [ 35.698900] ? tty_fasync+0x300/0x300 [ 35.698902] ? get_pid_task+0xf4/0x190 [ 35.698904] ? proc_fail_nth_write+0x95/0x1d0 [ 35.698906] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.698908] ? debug_check_no_obj_freed+0x201/0x490 [ 35.698910] ? __vfs_write+0xff/0x770 [ 35.698912] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.698915] ? common_file_perm+0x4e5/0x850 [ 35.698916] ? tty_fasync+0x300/0x300 [ 35.698918] do_vfs_ioctl+0xcdb/0x12e0 [ 35.698920] ? vfs_write+0x3d7/0x540 [ 35.698922] ? ioctl_preallocate+0x200/0x200 [ 35.698924] ? lock_downgrade+0x720/0x720 [ 35.698927] ? check_preemption_disabled+0x41/0x280 [ 35.698928] ? vfs_write+0x393/0x540 [ 35.698930] ? ksys_write+0x1c8/0x2a0 [ 35.698932] ksys_ioctl+0x9b/0xc0 [ 35.698934] __x64_sys_ioctl+0x6f/0xb0 [ 35.698936] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.698938] do_syscall_64+0xf9/0x620 [ 35.698940] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.698942] RIP: 0033:0x7f8e1e1e2789 [ 35.698949] 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 [ 35.698951] RSP: 002b:00007ffeeef53ad8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.698956] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8e1e1e2789 [ 35.698959] RDX: 0000000020000180 RSI: 0000000000005412 RDI: 0000000000000004 [ 35.698962] RBP: 00007ffeeef53af0 R08: 0000000000000001 R09: 0000000000000001 executing program [ 35.698965] R10: