------------[ cut here ]------------
======================================================
WARNING: possible circular locking dependency detected
6.10.0-rc1-syzkaller-00027-g4a4be1ad3a6e #0 Not tainted
------------------------------------------------------
aoe_tx0/1246 is trying to acquire lock:
ffffffff8dabeea0 (console_owner){-.-.}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:1994 [inline]
ffffffff8dabeea0 (console_owner){-.-.}-{0:0}, at: vprintk_emit kernel/printk/printk.c:2344 [inline]
ffffffff8dabeea0 (console_owner){-.-.}-{0:0}, at: vprintk_emit+0x42d/0x5a0 kernel/printk/printk.c:2300
but task is already holding lock:
ffffffff94dddf78 (&port_lock_key){-.-.}-{2:2}, at: uart_port_lock_irqsave include/linux/serial_core.h:618 [inline]
ffffffff94dddf78 (&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_trylock_spinning kernel/printk/printk.c:1994 [inline]
vprintk_emit kernel/printk/printk.c:2344 [inline]
vprintk_emit+0x442/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
handle_tx+0x203/0x630 drivers/net/caif/caif_serial.c:236
__netdev_start_xmit include/linux/netdevice.h:4882 [inline]
netdev_start_xmit include/linux/netdevice.h:4896 [inline]
xmit_one net/core/dev.c:3578 [inline]
dev_hard_start_xmit+0x143/0x790 net/core/dev.c:3594
__dev_queue_xmit+0x7ba/0x4130 net/core/dev.c:4393
dev_queue_xmit include/linux/netdevice.h:3095 [inline]
tx+0xcc/0x190 drivers/block/aoe/aoenet.c:62
kthread+0x1e7/0x3c0 drivers/block/aoe/aoecmd.c:1229
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
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 ***
3 locks held by aoe_tx0/1246:
#0: ffffffff8dbb1880 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#0: ffffffff8dbb1880 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:833 [inline]
#0: ffffffff8dbb1880 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x244/0x4130 net/core/dev.c:4318
#1: ffff8880533bdcd8 (_xmit_NONE#2){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
#1: ffff8880533bdcd8 (_xmit_NONE#2){+...}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline]
#1: ffff8880533bdcd8 (_xmit_NONE#2){+...}-{2:2}, at: __dev_queue_xmit+0x1af4/0x4130 net/core/dev.c:4389
#2: ffffffff94dddf78 (&port_lock_key){-.-.}-{2:2}, at: uart_port_lock_irqsave include/linux/serial_core.h:618 [inline]
#2: ffffffff94dddf78 (&port_lock_key){-.-.}-{2:2}, at: uart_write+0x134/0x3e0 drivers/tty/serial/serial_core.c:624
stack backtrace:
CPU: 1 PID: 1246 Comm: aoe_tx0 Not tainted 6.10.0-rc1-syzkaller-00027-g4a4be1ad3a6e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
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_trylock_spinning kernel/printk/printk.c:1994 [inline]
vprintk_emit kernel/printk/printk.c:2344 [inline]
vprintk_emit+0x442/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 ff 24 91 fc 90 0f 0b 90 49 c7 c4 d2 ff ff ff e9 39 ff ff ff e8 ea 24 91 fc 45 31 ff e8 e2 24 91 fc 90 <0f> 0b 90 48 85 ed 74 8c e8 d4 24 91 fc 4c 8d a5 08 01 00 00 4c 89
RSP: 0018:ffffc90004eafab8 EFLAGS: 00010093
RAX: 0000000000000000 RBX: ffff88801fcc8be8 RCX: ffffffff816c344d
RDX: ffff888023385a00 RSI: ffffffff84fcb00e RDI: ffff88801fcc8f48
RBP: ffffffff94dddf60 R08: 0000000000000001 R09: fffff520009d5f45
R10: 0000000000000003 R11: 0000000000000002 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000293
handle_tx+0x203/0x630 drivers/net/caif/caif_serial.c:236
__netdev_start_xmit include/linux/netdevice.h:4882 [inline]
netdev_start_xmit include/linux/netdevice.h:4896 [inline]
xmit_one net/core/dev.c:3578 [inline]
dev_hard_start_xmit+0x143/0x790 net/core/dev.c:3594
__dev_queue_xmit+0x7ba/0x4130 net/core/dev.c:4393
dev_queue_xmit include/linux/netdevice.h:3095 [inline]
tx+0xcc/0x190 drivers/block/aoe/aoenet.c:62
kthread+0x1e7/0x3c0 drivers/block/aoe/aoecmd.c:1229
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
WARNING: CPU: 1 PID: 1246 at drivers/tty/serial/serial_core.c:625 uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625
Modules linked in:
CPU: 1 PID: 1246 Comm: aoe_tx0 Not tainted 6.10.0-rc1-syzkaller-00027-g4a4be1ad3a6e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:uart_write+0x2bf/0x3e0 drivers/tty/serial/serial_core.c:625
Code: 6b fc e9 4e ff ff ff e8 ff 24 91 fc 90 0f 0b 90 49 c7 c4 d2 ff ff ff e9 39 ff ff ff e8 ea 24 91 fc 45 31 ff e8 e2 24 91 fc 90 <0f> 0b 90 48 85 ed 74 8c e8 d4 24 91 fc 4c 8d a5 08 01 00 00 4c 89
RSP: 0018:ffffc90004eafab8 EFLAGS: 00010093
RAX: 0000000000000000 RBX: ffff88801fcc8be8 RCX: ffffffff816c344d
RDX: ffff888023385a00 RSI: ffffffff84fcb00e RDI: ffff88801fcc8f48
RBP: ffffffff94dddf60 R08: 0000000000000001 R09: fffff520009d5f45
R10: 0000000000000003 R11: 0000000000000002 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000293
FS: 0000000000000000(0000) GS:ffff8880b9300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020029000 CR3: 0000000023006000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
handle_tx+0x203/0x630 drivers/net/caif/caif_serial.c:236
__netdev_start_xmit include/linux/netdevice.h:4882 [inline]
netdev_start_xmit include/linux/netdevice.h:4896 [inline]
xmit_one net/core/dev.c:3578 [inline]
dev_hard_start_xmit+0x143/0x790 net/core/dev.c:3594
__dev_queue_xmit+0x7ba/0x4130 net/core/dev.c:4393
dev_queue_xmit include/linux/netdevice.h:3095 [inline]
tx+0xcc/0x190 drivers/block/aoe/aoenet.c:62
kthread+0x1e7/0x3c0 drivers/block/aoe/aoecmd.c:1229
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244