Warning: Permanently added '10.128.10.18' (ECDSA) to the list of known hosts. [ 39.371873] FAULT_INJECTION: forcing a failure. [ 39.371873] name failslab, interval 1, probability 0, space 0, times 1 [ 39.383911] CPU: 0 PID: 8086 Comm: syz-executor189 Not tainted 4.19.211-syzkaller #0 [ 39.391806] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 39.401143] Call Trace: [ 39.403716] dump_stack+0x1fc/0x2ef [ 39.407330] should_fail.cold+0xa/0xf [ 39.411111] ? setup_fault_attr+0x200/0x200 [ 39.415414] ? mark_held_locks+0xf0/0xf0 [ 39.419455] ? mark_held_locks+0xf0/0xf0 [ 39.423494] __should_failslab+0x115/0x180 [ 39.427723] should_failslab+0x5/0x10 [ 39.431504] __kmalloc+0x6d/0x3c0 [ 39.434951] ? tty_buffer_alloc+0x23f/0x2a0 [ 39.439251] tty_buffer_alloc+0x23f/0x2a0 [ 39.443382] __tty_buffer_request_room+0x156/0x2a0 [ 39.448293] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 39.453809] ? do_raw_spin_lock+0xcb/0x220 [ 39.458024] pty_write+0x126/0x1f0 [ 39.461547] tty_put_char+0x122/0x150 [ 39.465421] ? dev_match_devt+0x90/0x90 [ 39.469372] ? tty_buffer_space_avail+0x7e/0xb0 [ 39.474033] ? pty_write_room+0xbe/0xe0 [ 39.477998] ? ptmx_open+0x350/0x350 [ 39.481709] __process_echoes+0x577/0x9f0 [ 39.485835] n_tty_receive_buf_common+0xc0c/0x2a90 [ 39.490745] ? n_tty_receive_buf2+0x40/0x40 [ 39.495050] tty_ioctl+0x1026/0x1630 [ 39.498744] ? tty_fasync+0x300/0x300 [ 39.502543] ? get_pid_task+0xf4/0x190 [ 39.506416] ? proc_fail_nth_write+0x95/0x1d0 [ 39.510890] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 39.515800] ? debug_check_no_obj_freed+0x201/0x490 [ 39.520814] ? __vfs_write+0xff/0x770 [ 39.524593] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 39.529521] ? common_file_perm+0x4e5/0x850 [ 39.533827] ? tty_fasync+0x300/0x300 [ 39.537613] do_vfs_ioctl+0xcdb/0x12e0 [ 39.541485] ? vfs_write+0x3d7/0x540 [ 39.545176] ? ioctl_preallocate+0x200/0x200 [ 39.549565] ? lock_downgrade+0x720/0x720 [ 39.553712] ? check_preemption_disabled+0x41/0x280 [ 39.558726] ? vfs_write+0x393/0x540 [ 39.562432] ? ksys_write+0x1c8/0x2a0 [ 39.566218] ksys_ioctl+0x9b/0xc0 [ 39.569658] __x64_sys_ioctl+0x6f/0xb0 executing program [ 39.573527] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 39.578091] do_syscall_64+0xf9/0x620 [ 39.581897] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.587066] RIP: 0033:0x7f3322fbd789 [ 39.590758] 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 [ 39.609636] RSP: 002b:00007ffea518f008 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 39.617320] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f3322fbd789 [ 39.624583] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 39.631830] RBP: 00007ffea518f020 R08: 0000000000000001 R09: 0000000000000001 [ 39.639078] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 39.646339] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 39.653596] [ 39.653599] ====================================================== [ 39.653602] WARNING: possible circular locking dependency detected [ 39.653604] 4.19.211-syzkaller #0 Not tainted [ 39.653607] ------------------------------------------------------ [ 39.653610] syz-executor189/8086 is trying to acquire lock: [ 39.653612] 000000008c18a49c (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 39.653619] [ 39.653621] but task is already holding lock: [ 39.653623] 00000000e4c4e819 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 39.653630] [ 39.653632] which lock already depends on the new lock. [ 39.653634] [ 39.653635] [ 39.653637] the existing dependency chain (in reverse order) is: [ 39.653638] [ 39.653640] -> #2 (&(&port->lock)->rlock){-.-.}: [ 39.653647] tty_port_tty_get+0x1d/0x80 [ 39.653649] tty_port_default_wakeup+0x11/0x40 [ 39.653651] serial8250_tx_chars+0x490/0xaf0 [ 39.653654] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 39.653656] serial8250_default_handle_irq+0xae/0x220 [ 39.653659] serial8250_interrupt+0x101/0x240 [ 39.653661] __handle_irq_event_percpu+0x27e/0x8e0 [ 39.653663] handle_irq_event+0x102/0x290 [ 39.653665] handle_edge_irq+0x260/0xcf0 [ 39.653667] handle_irq+0x35/0x50 [ 39.653669] do_IRQ+0x93/0x1c0 [ 39.653671] ret_from_intr+0x0/0x1e [ 39.653673] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 39.653675] uart_write+0x3bb/0x6f0 [ 39.653677] do_output_char+0x5de/0x850 [ 39.653679] n_tty_write+0x46e/0xff0 [ 39.653681] tty_write+0x496/0x810 [ 39.653683] redirected_tty_write+0xaa/0xb0 [ 39.653685] do_iter_write+0x461/0x5d0 [ 39.653687] vfs_writev+0x153/0x2e0 [ 39.653689] do_writev+0x136/0x330 [ 39.653691] do_syscall_64+0xf9/0x620 [ 39.653693] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.653694] [ 39.653695] -> #1 (&port_lock_key){-.-.}: [ 39.653703] serial8250_console_write+0x90e/0xb70 [ 39.653705] console_unlock+0xbb6/0x1110 [ 39.653707] vprintk_emit+0x2d1/0x740 [ 39.653709] vprintk_func+0x79/0x180 [ 39.653710] printk+0xba/0xed [ 39.653712] register_console+0x87f/0xc90 [ 39.653715] univ8250_console_init+0x3a/0x46 [ 39.653717] console_init+0x4cb/0x718 [ 39.653719] start_kernel+0x686/0x911 [ 39.653721] secondary_startup_64+0xa4/0xb0 [ 39.653722] [ 39.653723] -> #0 (console_owner){....}: [ 39.653730] console_unlock+0x411/0x1110 [ 39.653732] vprintk_emit+0x2d1/0x740 [ 39.653734] vprintk_func+0x79/0x180 [ 39.653736] printk+0xba/0xed [ 39.653738] should_fail+0x66b/0x7b0 [ 39.653740] __should_failslab+0x115/0x180 [ 39.653742] should_failslab+0x5/0x10 [ 39.653744] __kmalloc+0x6d/0x3c0 [ 39.653746] tty_buffer_alloc+0x23f/0x2a0 [ 39.653748] __tty_buffer_request_room+0x156/0x2a0 [ 39.653751] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 39.653753] pty_write+0x126/0x1f0 [ 39.653755] tty_put_char+0x122/0x150 [ 39.653757] __process_echoes+0x577/0x9f0 [ 39.653759] n_tty_receive_buf_common+0xc0c/0x2a90 [ 39.653761] tty_ioctl+0x1026/0x1630 [ 39.653763] do_vfs_ioctl+0xcdb/0x12e0 [ 39.653765] ksys_ioctl+0x9b/0xc0 [ 39.653767] __x64_sys_ioctl+0x6f/0xb0 [ 39.653769] do_syscall_64+0xf9/0x620 [ 39.653771] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.653773] [ 39.653775] other info that might help us debug this: [ 39.653776] [ 39.653777] Chain exists of: [ 39.653779] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 39.653788] [ 39.653790] Possible unsafe locking scenario: [ 39.653791] [ 39.653793] CPU0 CPU1 [ 39.653795] ---- ---- [ 39.653796] lock(&(&port->lock)->rlock); [ 39.653801] lock(&port_lock_key); [ 39.653806] lock(&(&port->lock)->rlock); [ 39.653810] lock(console_owner); [ 39.653814] [ 39.653815] *** DEADLOCK *** [ 39.653817] [ 39.653819] 6 locks held by syz-executor189/8086: [ 39.653820] #0: 00000000470f42c9 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 39.653828] #1: 0000000076fca8ab (&port->buf.lock/1){+.+.}, at: tty_ioctl+0xfbc/0x1630 [ 39.653838] #2: 00000000828447aa (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0x84/0x2a90 [ 39.653848] #3: 00000000c3ee7d02 (&ldata->output_lock){+.+.}, at: n_tty_receive_buf_common+0xbce/0x2a90 [ 39.653857] #4: 00000000e4c4e819 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 39.653865] #5: 00000000b34ab4a8 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 39.653874] [ 39.653875] stack backtrace: [ 39.653878] CPU: 0 PID: 8086 Comm: syz-executor189 Not tainted 4.19.211-syzkaller #0 [ 39.653882] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 39.653884] Call Trace: [ 39.653886] dump_stack+0x1fc/0x2ef [ 39.653889] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 39.653891] __lock_acquire+0x30c9/0x3ff0 [ 39.653893] ? mark_held_locks+0xf0/0xf0 [ 39.653895] ? snprintf+0xf0/0xf0 [ 39.653897] ? console_unlock+0x3ec/0x1110 [ 39.653899] lock_acquire+0x170/0x3c0 [ 39.653901] ? console_unlock+0x3a9/0x1110 [ 39.653903] console_unlock+0x411/0x1110 [ 39.653905] ? console_unlock+0x3a9/0x1110 [ 39.653907] vprintk_emit+0x2d1/0x740 [ 39.653909] vprintk_func+0x79/0x180 [ 39.653911] printk+0xba/0xed [ 39.653913] ? log_store.cold+0x16/0x16 [ 39.653915] ? __lock_acquire+0x22f9/0x3ff0 [ 39.653917] ? ___ratelimit+0x319/0x590 [ 39.653919] should_fail+0x66b/0x7b0 [ 39.653921] ? setup_fault_attr+0x200/0x200 [ 39.653923] ? mark_held_locks+0xf0/0xf0 [ 39.653925] ? mark_held_locks+0xf0/0xf0 [ 39.653927] __should_failslab+0x115/0x180 [ 39.653929] should_failslab+0x5/0x10 [ 39.653931] __kmalloc+0x6d/0x3c0 [ 39.653933] ? tty_buffer_alloc+0x23f/0x2a0 [ 39.653935] tty_buffer_alloc+0x23f/0x2a0 [ 39.653937] __tty_buffer_request_room+0x156/0x2a0 [ 39.653940] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 39.653942] ? do_raw_spin_lock+0xcb/0x220 [ 39.653944] pty_write+0x126/0x1f0 [ 39.653946] tty_put_char+0x122/0x150 [ 39.653948] ? dev_match_devt+0x90/0x90 [ 39.653950] ? tty_buffer_space_avail+0x7e/0xb0 [ 39.653952] ? pty_write_room+0xbe/0xe0 [ 39.653954] ? ptmx_open+0x350/0x350 [ 39.653956] __process_echoes+0x577/0x9f0 [ 39.653958] n_tty_receive_buf_common+0xc0c/0x2a90 [ 39.653961] ? n_tty_receive_buf2+0x40/0x40 [ 39.653963] tty_ioctl+0x1026/0x1630 [ 39.653965] ? tty_fasync+0x300/0x300 [ 39.653966] ? get_pid_task+0xf4/0x190 [ 39.653969] ? proc_fail_nth_write+0x95/0x1d0 [ 39.653971] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 39.653973] ? debug_check_no_obj_freed+0x201/0x490 [ 39.653975] ? __vfs_write+0xff/0x770 [ 39.653978] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 39.653980] ? common_file_perm+0x4e5/0x850 [ 39.653982] ? tty_fasync+0x300/0x300 [ 39.653984] do_vfs_ioctl+0xcdb/0x12e0 [ 39.653986] ? vfs_write+0x3d7/0x540 [ 39.653988] ? ioctl_preallocate+0x200/0x200 [ 39.653990] ? lock_downgrade+0x720/0x720 [ 39.653992] ? check_preemption_disabled+0x41/0x280 [ 39.653994] ? vfs_write+0x393/0x540 [ 39.653996] ? ksys_write+0x1c8/0x2a0 [ 39.653998] ksys_ioctl+0x9b/0xc0 [ 39.654000] __x64_sys_ioctl+0x6f/0xb0 [ 39.654002] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 39.654004] do_syscall_64+0xf9/0x620 [ 39.654007] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 39.654009] RIP: 0033:0x7f3322fbd789 [ 39.654016] 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 [ 39.654018] RSP: 002b:00007ffea518f008 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 39.654023] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f3322fbd789 [ 39.654026] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 39.654029] RBP: 00007ffea518f020 R08: 0000000000000001 R09: 0000000000000001 [ 39.65403