Warning: Permanently added '10.128.1.82' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.395528] FAULT_INJECTION: forcing a failure. [ 35.395528] name failslab, interval 1, probability 0, space 0, times 1 [ 35.407602] CPU: 1 PID: 8113 Comm: syz-executor661 Not tainted 4.19.211-syzkaller #0 [ 35.415461] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.424792] Call Trace: [ 35.427363] dump_stack+0x1fc/0x2ef [ 35.431006] should_fail.cold+0xa/0xf [ 35.434802] ? setup_fault_attr+0x200/0x200 [ 35.439112] ? mark_held_locks+0xf0/0xf0 [ 35.443163] __should_failslab+0x115/0x180 [ 35.447387] should_failslab+0x5/0x10 [ 35.451167] __kmalloc+0x6d/0x3c0 [ 35.454597] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.458897] ? __mutex_lock+0x368/0x1190 [ 35.462938] tty_buffer_alloc+0x23f/0x2a0 [ 35.467073] __tty_buffer_request_room+0x156/0x2a0 [ 35.471982] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.477502] ? do_raw_spin_lock+0xcb/0x220 [ 35.481715] pty_write+0x126/0x1f0 [ 35.485238] n_tty_write+0xa03/0xff0 [ 35.488929] ? __ldsem_down_read_nested+0xd2/0x780 [ 35.493836] ? n_tty_open+0x160/0x160 [ 35.497612] ? do_wait_intr_irq+0x270/0x270 [ 35.501909] ? __might_fault+0x192/0x1d0 [ 35.505945] tty_write+0x496/0x810 [ 35.509462] ? n_tty_open+0x160/0x160 [ 35.513241] __vfs_write+0xf7/0x770 [ 35.516843] ? tty_compat_ioctl+0x270/0x270 [ 35.521140] ? common_file_perm+0x4e5/0x850 [ 35.525440] ? kernel_read+0x110/0x110 [ 35.529313] ? trace_hardirqs_off+0x64/0x200 [ 35.533697] ? apparmor_getprocattr+0x11e0/0x11e0 [ 35.538521] ? vfs_write+0x3d7/0x540 [ 35.542216] ? security_file_permission+0x1c0/0x220 [ 35.547243] vfs_write+0x1f3/0x540 [ 35.550761] ksys_write+0x12b/0x2a0 [ 35.554364] ? __ia32_sys_read+0xb0/0xb0 [ 35.558419] ? trace_hardirqs_off_caller+0x6e/0x210 [ 35.563413] ? do_syscall_64+0x21/0x620 [ 35.567363] do_syscall_64+0xf9/0x620 [ 35.571157] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.576323] RIP: 0033:0x7fc718504759 [ 35.580015] Code: 2a 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 90 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.598890] RSP: 002b:00007ffd4da3f1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 35.606581] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fc718504759 [ 35.613831] RDX: 000000000000ff2e RSI: 0000000020000900 RDI: 0000000000000003 [ 35.621078] RBP: 00007ffd4da3f200 R08: 0000000000000001 R09: 00007fc718570032 [ 35.628327] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 35.635578] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 35.642835] [ 35.642838] ====================================================== [ 35.642841] WARNING: possible circular locking dependency detected [ 35.642843] 4.19.211-syzkaller #0 Not tainted [ 35.642846] ------------------------------------------------------ [ 35.642849] syz-executor661/8113 is trying to acquire lock: [ 35.642851] 00000000d58b73c4 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 35.642858] [ 35.642860] but task is already holding lock: [ 35.642862] 000000003423fdf1 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.642869] [ 35.642871] which lock already depends on the new lock. [ 35.642873] [ 35.642874] [ 35.642877] the existing dependency chain (in reverse order) is: [ 35.642878] [ 35.642879] -> #2 (&(&port->lock)->rlock){-.-.}: [ 35.642886] tty_port_tty_get+0x1d/0x80 [ 35.642888] tty_port_default_wakeup+0x11/0x40 [ 35.642891] serial8250_tx_chars+0x490/0xaf0 [ 35.642893] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 35.642895] serial8250_default_handle_irq+0xae/0x220 [ 35.642898] serial8250_interrupt+0x101/0x240 [ 35.642900] __handle_irq_event_percpu+0x27e/0x8e0 [ 35.642902] handle_irq_event+0x102/0x290 [ 35.642904] handle_edge_irq+0x260/0xcf0 [ 35.642906] handle_irq+0x35/0x50 [ 35.642908] do_IRQ+0x93/0x1c0 [ 35.642910] ret_from_intr+0x0/0x1e [ 35.642912] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 35.642914] uart_write+0x3bb/0x6f0 [ 35.642916] do_output_char+0x5de/0x850 [ 35.642918] n_tty_write+0x46e/0xff0 [ 35.642920] tty_write+0x496/0x810 [ 35.642922] redirected_tty_write+0xaa/0xb0 [ 35.642924] do_iter_write+0x461/0x5d0 [ 35.642926] vfs_writev+0x153/0x2e0 [ 35.642928] do_writev+0x136/0x330 [ 35.642930] do_syscall_64+0xf9/0x620 [ 35.642932] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.642934] [ 35.642935] -> #1 (&port_lock_key){-.-.}: [ 35.642942] serial8250_console_write+0x90e/0xb70 [ 35.642944] console_unlock+0xbb6/0x1110 [ 35.642946] vprintk_emit+0x2d1/0x740 [ 35.642948] vprintk_func+0x79/0x180 [ 35.642950] printk+0xba/0xed [ 35.642952] register_console+0x87f/0xc90 [ 35.642954] univ8250_console_init+0x3a/0x46 [ 35.642956] console_init+0x4cb/0x718 [ 35.642958] start_kernel+0x686/0x911 [ 35.642960] secondary_startup_64+0xa4/0xb0 [ 35.642961] [ 35.642962] -> #0 (console_owner){....}: [ 35.642973] console_unlock+0x411/0x1110 [ 35.642975] vprintk_emit+0x2d1/0x740 [ 35.642977] vprintk_func+0x79/0x180 [ 35.642979] printk+0xba/0xed [ 35.642981] should_fail+0x66b/0x7b0 [ 35.642983] __should_failslab+0x115/0x180 [ 35.642985] should_failslab+0x5/0x10 [ 35.642987] __kmalloc+0x6d/0x3c0 [ 35.642989] tty_buffer_alloc+0x23f/0x2a0 [ 35.642991] __tty_buffer_request_room+0x156/0x2a0 [ 35.642994] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.642996] pty_write+0x126/0x1f0 [ 35.642998] n_tty_write+0xa03/0xff0 [ 35.643000] tty_write+0x496/0x810 [ 35.643002] __vfs_write+0xf7/0x770 [ 35.643004] vfs_write+0x1f3/0x540 [ 35.643006] ksys_write+0x12b/0x2a0 [ 35.643008] do_syscall_64+0xf9/0x620 [ 35.643010] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.643011] [ 35.643013] other info that might help us debug this: [ 35.643015] [ 35.643016] Chain exists of: [ 35.643017] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 35.643026] [ 35.643028] Possible unsafe locking scenario: [ 35.643030] [ 35.643032] CPU0 CPU1 [ 35.643034] ---- ---- [ 35.643035] lock(&(&port->lock)->rlock); [ 35.643040] lock(&port_lock_key); [ 35.643045] lock(&(&port->lock)->rlock); [ 35.643049] lock(console_owner); [ 35.643053] [ 35.643054] *** DEADLOCK *** [ 35.643055] [ 35.643057] 6 locks held by syz-executor661/8113: [ 35.643059] #0: 00000000f5140641 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 35.643067] #1: 000000000c98ae0b (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 35.643076] #2: 000000003d2b5733 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 35.643084] #3: 000000000fab48e5 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 35.643092] #4: 000000003423fdf1 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.643101] #5: 00000000286c3676 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 35.643109] [ 35.643111] stack backtrace: [ 35.643114] CPU: 1 PID: 8113 Comm: syz-executor661 Not tainted 4.19.211-syzkaller #0 [ 35.643118] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.643119] Call Trace: [ 35.643121] dump_stack+0x1fc/0x2ef [ 35.643124] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.643126] __lock_acquire+0x30c9/0x3ff0 [ 35.643128] ? mark_held_locks+0xf0/0xf0 [ 35.643130] ? snprintf+0xf0/0xf0 [ 35.643132] ? console_unlock+0x3ec/0x1110 [ 35.643134] lock_acquire+0x170/0x3c0 [ 35.643136] ? console_unlock+0x3a9/0x1110 [ 35.643138] console_unlock+0x411/0x1110 [ 35.643140] ? console_unlock+0x3a9/0x1110 [ 35.643142] vprintk_emit+0x2d1/0x740 [ 35.643144] vprintk_func+0x79/0x180 [ 35.643146] printk+0xba/0xed [ 35.643148] ? log_store.cold+0x16/0x16 [ 35.643150] ? __lock_acquire+0x22f9/0x3ff0 [ 35.643152] ? ___ratelimit+0x319/0x590 [ 35.643154] should_fail+0x66b/0x7b0 [ 35.643156] ? setup_fault_attr+0x200/0x200 [ 35.643158] ? mark_held_locks+0xf0/0xf0 [ 35.643160] __should_failslab+0x115/0x180 [ 35.643162] should_failslab+0x5/0x10 [ 35.643164] __kmalloc+0x6d/0x3c0 [ 35.643166] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.643168] ? __mutex_lock+0x368/0x1190 [ 35.643170] tty_buffer_alloc+0x23f/0x2a0 [ 35.643173] __tty_buffer_request_room+0x156/0x2a0 [ 35.643175] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.643177] ? do_raw_spin_lock+0xcb/0x220 [ 35.643179] pty_write+0x126/0x1f0 [ 35.643181] n_tty_write+0xa03/0xff0 [ 35.643184] ? __ldsem_down_read_nested+0xd2/0x780 [ 35.643186] ? n_tty_open+0x160/0x160 [ 35.643188] ? do_wait_intr_irq+0x270/0x270 [ 35.643190] ? __might_fault+0x192/0x1d0 [ 35.643192] tty_write+0x496/0x810 [ 35.643194] ? n_tty_open+0x160/0x160 [ 35.643195] __vfs_write+0xf7/0x770 [ 35.643198] ? tty_compat_ioctl+0x270/0x270 [ 35.643200] ? common_file_perm+0x4e5/0x850 [ 35.643202] ? kernel_read+0x110/0x110 [ 35.643204] ? trace_hardirqs_off+0x64/0x200 [ 35.643206] ? apparmor_getprocattr+0x11e0/0x11e0 [ 35.643208] ? vfs_write+0x3d7/0x540 [ 35.643211] ? security_file_permission+0x1c0/0x220 [ 35.643212] vfs_write+0x1f3/0x540 [ 35.643214] ksys_write+0x12b/0x2a0 [ 35.643216] ? __ia32_sys_read+0xb0/0xb0 [ 35.643219] ? trace_hardirqs_off_caller+0x6e/0x210 [ 35.643221] ? do_syscall_64+0x21/0x620 [ 35.643223] do_syscall_64+0xf9/0x620 [ 35.643225] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.643227] RIP: 0033:0x7fc718504759 [ 35.643234] Code: 2a 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 90 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.643237] RSP: 002b:00007ffd4da3f1f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 35.643242] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fc718504759 [ 35.643245] RDX: 000000000000ff2e RSI: 0000000020000900 RDI: 0000000000000003 [ 35.643248] RBP: 00007ffd4da3f200 R08: 0000000000000001 R09: 00007fc718570032 [ 35.643251] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 35.643254] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000