------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Not tainted ------------------------------------------------------ syz-executor.0/5353 is trying to acquire lock: ffffffff8dabeee0 (console_owner){....}-{0:0}, at: console_lock_spinning_enable kernel/printk/printk.c:1870 [inline] ffffffff8dabeee0 (console_owner){....}-{0:0}, at: console_emit_next_record kernel/printk/printk.c:2922 [inline] ffffffff8dabeee0 (console_owner){....}-{0:0}, at: console_flush_all+0x4ff/0xd70 kernel/printk/printk.c:2994 but task is already holding lock: ffffffff94de0f78 (&port_lock_key){-.-.}-{2:2}, at: uart_port_lock_irqsave include/linux/serial_core.h:618 [inline] ffffffff94de0f78 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x134/0x3e0 drivers/tty/serial/serial_core.c:624 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:618 [inline] serial8250_console_write+0xaa6/0x1090 drivers/tty/serial/8250/8250_port.c:3352 console_emit_next_record kernel/printk/printk.c:2928 [inline] console_flush_all+0x53f/0xd70 kernel/printk/printk.c:2994 console_unlock+0xae/0x290 kernel/printk/printk.c:3063 vprintk_emit kernel/printk/printk.c:2345 [inline] vprintk_emit+0x11a/0x5a0 kernel/printk/printk.c:2300 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2370 register_console+0xa88/0x10a0 kernel/printk/printk.c:3596 univ8250_console_init+0x35/0x50 drivers/tty/serial/8250/8250_core.c:719 console_init+0xcc/0x680 kernel/printk/printk.c:3742 start_kernel+0x295/0x4c0 init/main.c:1038 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x148 -> #0 (console_owner){....}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 console_lock_spinning_enable kernel/printk/printk.c:1870 [inline] console_emit_next_record kernel/printk/printk.c:2922 [inline] console_flush_all+0x514/0xd70 kernel/printk/printk.c:2994 console_unlock+0xae/0x290 kernel/printk/printk.c:3063 vprintk_emit kernel/printk/printk.c:2345 [inline] vprintk_emit+0x11a/0x5a0 kernel/printk/printk.c:2300 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2370 __report_bug lib/bug.c:195 [inline] report_bug+0x4ac/0x580 lib/bug.c:219 handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:239 exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:260 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625 ppp_async_push+0x89e/0x1740 drivers/net/ppp/ppp_async.c:666 ppp_async_send+0xe5/0x120 drivers/net/ppp/ppp_async.c:634 __ppp_channel_push+0xe5/0x230 drivers/net/ppp/ppp_generic.c:2150 ppp_channel_push+0x1c2/0x250 drivers/net/ppp/ppp_generic.c:2177 ppp_write+0x236/0x2e0 drivers/net/ppp/ppp_generic.c:525 do_loop_readv_writev fs/read_write.c:764 [inline] do_loop_readv_writev fs/read_write.c:749 [inline] vfs_writev+0x6ec/0xde0 fs/read_write.c:973 do_pwritev fs/read_write.c:1072 [inline] __do_sys_pwritev fs/read_write.c:1119 [inline] __se_sys_pwritev fs/read_write.c:1114 [inline] __x64_sys_pwritev+0x22b/0x310 fs/read_write.c:1114 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port_lock_key); lock(console_owner); lock(&port_lock_key); lock(console_owner); *** DEADLOCK *** 6 locks held by syz-executor.0/5353: #0: ffff888046844a48 (&pch->upl){.+..}-{2:2}, at: ppp_channel_push+0x28/0x250 drivers/net/ppp/ppp_generic.c:2171 #1: ffff8880468449e0 (&pch->downl){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff8880468449e0 (&pch->downl){+...}-{2:2}, at: __ppp_channel_push+0x2a/0x230 drivers/net/ppp/ppp_generic.c:2146 #2: ffff888027888030 (&ap->xmit_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #2: ffff888027888030 (&ap->xmit_lock){+...}-{2:2}, at: ppp_async_push+0x106/0x1740 drivers/net/ppp/ppp_async.c:659 #3: ffffffff94de0f78 (&port_lock_key){-.-.}-{2:2}, at: uart_port_lock_irqsave include/linux/serial_core.h:618 [inline] #3: ffffffff94de0f78 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x134/0x3e0 drivers/tty/serial/serial_core.c:624 #4: ffffffff8db9f320 (console_lock){+.+.}-{0:0}, at: vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 #5: ffffffff8db9f390 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:334 [inline] #5: ffffffff8db9f390 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline] #5: ffffffff8db9f390 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:286 [inline] #5: ffffffff8db9f390 (console_srcu){....}-{0:0}, at: console_flush_all+0x12d/0xd70 kernel/printk/printk.c:2986 stack backtrace: CPU: 3 PID: 5353 Comm: syz-executor.0 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2478/0x3b30 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 console_lock_spinning_enable kernel/printk/printk.c:1870 [inline] console_emit_next_record kernel/printk/printk.c:2922 [inline] console_flush_all+0x514/0xd70 kernel/printk/printk.c:2994 console_unlock+0xae/0x290 kernel/printk/printk.c:3063 vprintk_emit kernel/printk/printk.c:2345 [inline] vprintk_emit+0x11a/0x5a0 kernel/printk/printk.c:2300 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2370 __report_bug lib/bug.c:195 [inline] report_bug+0x4ac/0x580 lib/bug.c:219 handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:239 exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:260 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 RIP: 0010:uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625 Code: 6b fc e9 4e ff ff ff e8 5f 03 91 fc 90 0f 0b 90 49 c7 c4 d2 ff ff ff e9 39 ff ff ff e8 4a 03 91 fc 45 31 ff e8 42 03 91 fc 90 <0f> 0b 90 48 85 ed 74 8c e8 34 03 91 fc 4c 8d a5 08 01 00 00 4c 89 RSP: 0018:ffffc90002747a40 EFLAGS: 00010087 RAX: 000000000000b6fa RBX: ffff88801fe60be8 RCX: ffffc90005d21000 RDX: 0000000000040000 RSI: ffffffff84fce20e RDI: ffff88801fe60f48 RBP: ffffffff94de0f60 R08: 0000000000000001 R09: fffff520004e8f36 R10: 0000000000000003 R11: ffffffff93950570 R12: 0000000000000001 R13: 0000000000000ffa R14: ffff888027888001 R15: 0000000000000287 ppp_async_push+0x89e/0x1740 drivers/net/ppp/ppp_async.c:666 ppp_async_send+0xe5/0x120 drivers/net/ppp/ppp_async.c:634 __ppp_channel_push+0xe5/0x230 drivers/net/ppp/ppp_generic.c:2150 ppp_channel_push+0x1c2/0x250 drivers/net/ppp/ppp_generic.c:2177 ppp_write+0x236/0x2e0 drivers/net/ppp/ppp_generic.c:525 do_loop_readv_writev fs/read_write.c:764 [inline] do_loop_readv_writev fs/read_write.c:749 [inline] vfs_writev+0x6ec/0xde0 fs/read_write.c:973 do_pwritev fs/read_write.c:1072 [inline] __do_sys_pwritev fs/read_write.c:1119 [inline] __se_sys_pwritev fs/read_write.c:1114 [inline] __x64_sys_pwritev+0x22b/0x310 fs/read_write.c:1114 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f827927cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f827a0a60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000128 RAX: ffffffffffffffda RBX: 00007f82793abf80 RCX: 00007f827927cee9 RDX: 0000000000000002 RSI: 0000000020000380 RDI: 0000000000000004 RBP: 00007f82792c949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f82793abf80 R15: 00007ffc616fc218 WARNING: CPU: 3 PID: 5353 at drivers/tty/serial/serial_core.c:625 uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625 Modules linked in: CPU: 3 PID: 5353 Comm: syz-executor.0 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 RIP: 0010:uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625 Code: 6b fc e9 4e ff ff ff e8 5f 03 91 fc 90 0f 0b 90 49 c7 c4 d2 ff ff ff e9 39 ff ff ff e8 4a 03 91 fc 45 31 ff e8 42 03 91 fc 90 <0f> 0b 90 48 85 ed 74 8c e8 34 03 91 fc 4c 8d a5 08 01 00 00 4c 89 RSP: 0018:ffffc90002747a40 EFLAGS: 00010087 RAX: 000000000000b6fa RBX: ffff88801fe60be8 RCX: ffffc90005d21000 RDX: 0000000000040000 RSI: ffffffff84fce20e RDI: ffff88801fe60f48 RBP: ffffffff94de0f60 R08: 0000000000000001 R09: fffff520004e8f36 R10: 0000000000000003 R11: ffffffff93950570 R12: 0000000000000001 R13: 0000000000000ffa R14: ffff888027888001 R15: 0000000000000287 FS: 00007f827a0a66c0(0000) GS:ffff88806b300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000200010c0 CR3: 000000002533e000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ppp_async_push+0x89e/0x1740 drivers/net/ppp/ppp_async.c:666 ppp_async_send+0xe5/0x120 drivers/net/ppp/ppp_async.c:634 __ppp_channel_push+0xe5/0x230 drivers/net/ppp/ppp_generic.c:2150 ppp_channel_push+0x1c2/0x250 drivers/net/ppp/ppp_generic.c:2177 ppp_write+0x236/0x2e0 drivers/net/ppp/ppp_generic.c:525 do_loop_readv_writev fs/read_write.c:764 [inline] do_loop_readv_writev fs/read_write.c:749 [inline] vfs_writev+0x6ec/0xde0 fs/read_write.c:973 do_pwritev fs/read_write.c:1072 [inline] __do_sys_pwritev fs/read_write.c:1119 [inline] __se_sys_pwritev fs/read_write.c:1114 [inline] __x64_sys_pwritev+0x22b/0x310 fs/read_write.c:1114 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f827927cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f827a0a60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000128 RAX: ffffffffffffffda RBX: 00007f82793abf80 RCX: 00007f827927cee9 RDX: 0000000000000002 RSI: 0000000020000380 RDI: 0000000000000004 RBP: 00007f82792c949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f82793abf80 R15: 00007ffc616fc218