R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff06f84d5f R14: 00007f5bdac95300 R15: 0000000000022000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/32055 is trying to acquire lock: 000000000c221799 (console_owner){-...}, at: console_trylock_spinning kernel/printk/printk.c:1697 [inline] 000000000c221799 (console_owner){-...}, at: vprintk_emit+0x3fe/0x740 kernel/printk/printk.c:1964 but task is already holding lock: 000000009b6b8f5f (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 drivers/tty/pty.c:120 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&(&port->lock)->rlock){-.-.}: tty_port_tty_get+0x1d/0x80 drivers/tty/tty_port.c:289 tty_port_default_wakeup+0x11/0x40 drivers/tty/tty_port.c:47 serial8250_tx_chars+0x490/0xaf0 drivers/tty/serial/8250/8250_port.c:1813 serial8250_handle_irq.part.0+0x31f/0x3d0 drivers/tty/serial/8250/8250_port.c:1900 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1873 [inline] serial8250_default_handle_irq+0xae/0x220 drivers/tty/serial/8250/8250_port.c:1916 serial8250_interrupt+0x101/0x240 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x27e/0x8e0 kernel/irq/handle.c:149 handle_irq_event_percpu kernel/irq/handle.c:189 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:206 handle_edge_irq+0x260/0xcf0 kernel/irq/chip.c:800 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1c0 arch/x86/kernel/irq.c:246 ret_from_intr+0x0/0x1e native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0x49/0x310 arch/x86/kernel/process.c:557 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x2ec/0x4b0 kernel/sched/idle.c:263 cpu_startup_entry+0xc5/0xe0 kernel/sched/idle.c:369 start_secondary+0x435/0x5c0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&port_lock_key){-.-.}: serial8250_console_write+0x90e/0xb70 drivers/tty/serial/8250/8250_port.c:3290 call_console_drivers kernel/printk/printk.c:1764 [inline] console_unlock+0xbb6/0x1110 kernel/printk/printk.c:2460 vprintk_emit+0x2d1/0x740 kernel/printk/printk.c:1965 vprintk_func+0x79/0x180 kernel/printk/printk_safe.c:405 printk+0xba/0xed kernel/printk/printk.c:2040 register_console+0x87f/0xc90 kernel/printk/printk.c:2776 univ8250_console_init+0x3a/0x46 drivers/tty/serial/8250/8250_core.c:684 console_init+0x4cb/0x718 kernel/printk/printk.c:2862 start_kernel+0x686/0x911 init/main.c:659 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #0 (console_owner){-...}: console_trylock_spinning kernel/printk/printk.c:1718 [inline] vprintk_emit+0x43b/0x740 kernel/printk/printk.c:1964 vprintk_func+0x79/0x180 kernel/printk/printk_safe.c:405 printk+0xba/0xed kernel/printk/printk.c:2040 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x66b/0x7b0 lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x6d/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] tty_buffer_alloc+0x23f/0x2a0 drivers/tty/tty_buffer.c:170 __tty_buffer_request_room+0x156/0x2a0 drivers/tty/tty_buffer.c:268 tty_insert_flip_string_fixed_flag+0x93/0x250 drivers/tty/tty_buffer.c:313 tty_insert_flip_string include/linux/tty_flip.h:37 [inline] pty_write+0x126/0x1f0 drivers/tty/pty.c:122 n_tty_write+0xa03/0xff0 drivers/tty/n_tty.c:2354 do_tty_write drivers/tty/tty_io.c:960 [inline] tty_write+0x496/0x810 drivers/tty/tty_io.c:1044 do_loop_readv_writev fs/read_write.c:704 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_write+0x461/0x5d0 fs/read_write.c:962 vfs_writev+0x153/0x2e0 fs/read_write.c:1005 do_writev+0x136/0x330 fs/read_write.c:1040 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: console_owner --> &port_lock_key --> &(&port->lock)->rlock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&port->lock)->rlock); lock(&port_lock_key); lock(&(&port->lock)->rlock); lock(console_owner); *** DEADLOCK *** 5 locks held by syz-executor.4/32055: #0: 0000000036657f2b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272 #1: 00000000030768f1 (&tty->atomic_write_lock){+.+.}, at: tty_write_lock drivers/tty/tty_io.c:886 [inline] #1: 00000000030768f1 (&tty->atomic_write_lock){+.+.}, at: do_tty_write drivers/tty/tty_io.c:909 [inline] #1: 00000000030768f1 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 drivers/tty/tty_io.c:1044 #2: 0000000073be4681 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 drivers/tty/n_tty.c:2314 #3: 000000007d183f0b (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 drivers/tty/n_tty.c:2353 #4: 000000009b6b8f5f (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 drivers/tty/pty.c:120 stack backtrace: CPU: 1 PID: 32055 Comm: syz-executor.4 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 console_trylock_spinning kernel/printk/printk.c:1718 [inline] vprintk_emit+0x43b/0x740 kernel/printk/printk.c:1964 vprintk_func+0x79/0x180 kernel/printk/printk_safe.c:405 printk+0xba/0xed kernel/printk/printk.c:2040 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x66b/0x7b0 lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x6d/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] tty_buffer_alloc+0x23f/0x2a0 drivers/tty/tty_buffer.c:170 __tty_buffer_request_room+0x156/0x2a0 drivers/tty/tty_buffer.c:268 tty_insert_flip_string_fixed_flag+0x93/0x250 drivers/tty/tty_buffer.c:313 tty_insert_flip_string include/linux/tty_flip.h:37 [inline] pty_write+0x126/0x1f0 drivers/tty/pty.c:122 n_tty_write+0xa03/0xff0 drivers/tty/n_tty.c:2354 do_tty_write drivers/tty/tty_io.c:960 [inline] tty_write+0x496/0x810 drivers/tty/tty_io.c:1044 do_loop_readv_writev fs/read_write.c:704 [inline] do_loop_readv_writev fs/read_write.c:688 [inline] do_iter_write+0x461/0x5d0 fs/read_write.c:962 vfs_writev+0x153/0x2e0 fs/read_write.c:1005 do_writev+0x136/0x330 fs/read_write.c:1040 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f5bdc31fe99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5bdac95168 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f5bdc432f60 RCX: 00007f5bdc31fe99 RDX: 10000000000003ff RSI: 00000000200023c0 RDI: 0000000000000004 RBP: 00007f5bdac951d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff06f84d5f R14: 00007f5bdac95300 R15: 0000000000022000 CPU: 0 PID: 32077 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:3088 [inline] prepare_alloc_pages mm/page_alloc.c:4346 [inline] __alloc_pages_nodemask+0x239/0x2890 mm/page_alloc.c:4393 __alloc_pages include/linux/gfp.h:496 [inline] __alloc_pages_node include/linux/gfp.h:509 [inline] kmem_getpages mm/slab.c:1412 [inline] cache_grow_begin+0xa4/0x8a0 mm/slab.c:2682 cache_alloc_refill+0x273/0x340 mm/slab.c:3049 ____cache_alloc mm/slab.c:3132 [inline] __do_cache_alloc mm/slab.c:3354 [inline] slab_alloc mm/slab.c:3389 [inline] kmem_cache_alloc+0x346/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 getname fs/namei.c:211 [inline] do_renameat2+0x176/0xc70 fs/namei.c:4547 __do_sys_renameat2 fs/namei.c:4664 [inline] __se_sys_renameat2 fs/namei.c:4661 [inline] __x64_sys_renameat2+0xba/0x150 fs/namei.c:4661 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0bf95f8e99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0bf7f0b168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f0bf970c1d0 RCX: 00007f0bf95f8e99 RDX: 0000000000000005 RSI: 0000000020001680 RDI: 0000000000000003 RBP: 00007f0bf7f0b1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200016c0 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff86da2f6f R14: 00007f0bf7f0b300 R15: 0000000000022000 CPU: 1 PID: 32069 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x2ab/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] ext4_htree_store_dirent+0x87/0x650 fs/ext4/dir.c:458 htree_dirblock_to_tree+0x29b/0x5e0 fs/ext4/namei.c:1037 ext4_htree_fill_tree+0x239/0xb60 fs/ext4/namei.c:1114 ext4_dx_readdir fs/ext4/dir.c:582 [inline] ext4_readdir+0x14c3/0x2dc0 fs/ext4/dir.c:125 iterate_dir+0x473/0x5c0 fs/readdir.c:51 ksys_getdents64+0x175/0x2b0 fs/readdir.c:357 __do_sys_getdents64 fs/readdir.c:376 [inline] __se_sys_getdents64 fs/readdir.c:373 [inline] __x64_sys_getdents64+0x6f/0xb0 fs/readdir.c:373 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb3bb23fe99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb3b9bb5168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007fb3bb352f60 RCX: 00007fb3bb23fe99 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fb3b9bb51d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffdfaa8bb8f R14: 00007fb3b9bb5300 R15: 0000000000022000 CPU: 0 PID: 32072 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x277/0x370 mm/slab.c:3557 __d_alloc+0x2b/0xa10 fs/dcache.c:1612 d_alloc+0x4a/0x230 fs/dcache.c:1696 __lookup_hash+0xc8/0x180 fs/namei.c:1543 do_renameat2+0x725/0xc70 fs/namei.c:4589 __do_sys_renameat2 fs/namei.c:4664 [inline] __se_sys_renameat2 fs/namei.c:4661 [inline] __x64_sys_renameat2+0xba/0x150 fs/namei.c:4661 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f1bb36b9e99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1bb202f168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f1bb37ccf60 RCX: 00007f1bb36b9e99 RDX: 0000000000000003 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 00007f1bb202f1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff5690cd7f R14: 00007f1bb202f300 R15: 0000000000022000 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 32149 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0xa/0xf lib/fault-inject.c:149 __should_failslab+0x115/0x180 mm/failslab.c:32 should_failslab+0x5/0x10 mm/slab_common.c:1590 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] kmem_cache_alloc+0x277/0x370 mm/slab.c:3557 getname_flags+0xce/0x590 fs/namei.c:140 getname fs/namei.c:211 [inline] do_renameat2+0x1c5/0xc70 fs/namei.c:4554 __do_sys_renameat2 fs/namei.c:4664 [inline] __se_sys_renameat2 fs/namei.c:4661 [inline] __x64_sys_renameat2+0xba/0x150 fs/namei.c:4661 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f0bf95f8e99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0bf7f6e168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007f0bf970bf60 RCX: 00007f0bf95f8e99 RDX: 0000000000000003 RSI: 0000000020001680 RDI: 0000000000000004 RBP: 00007f0bf7f6e1d0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200016c0 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fff86da2f6f R14: 00007f0bf7f6e300 R15: 0000000000022000 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop5): mounted filesystem without journal. Opts: ,errors=continue IPVS: sync thread started: state = MASTER, mcast_ifn = veth1_to_team, syncid = 4, id = 0 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue IPVS: sync thread started: state = MASTER, mcast_ifn = veth1_to_team, syncid = 4, id = 0 EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): Unrecognized mount option "./file0" or missing value EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue