============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/11007 is trying to acquire lock: 000000001a88ba17 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 000000001a88ba17 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&port_lock_key); lock(&port_lock_key); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by syz-executor.1/11007: #0: 0000000013c92832 (cb_lock){++++}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:637 #1: 00000000cdd0b4f5 (genl_mutex){+.+.}, at: genl_lock net/netlink/genetlink.c:33 [inline] #1: 00000000cdd0b4f5 (genl_mutex){+.+.}, at: genl_rcv_msg+0x12f/0x160 net/netlink/genetlink.c:625 #2: 00000000cd9916e3 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #2: 00000000cd9916e3 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #3: 000000001a88ba17 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 UDF-fs: INFO Mounting volume 'LinuxUDF', timestamp 2020/09/19 18:44 (1000) #4: 000000002e188cd1 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 0 PID: 11007 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:1764 [inline] check_deadlock kernel/locking/lockdep.c:1808 [inline] validate_chain kernel/locking/lockdep.c:2404 [inline] __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:152 uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 n_hdlc_send_frames+0x278/0x470 drivers/tty/n_hdlc.c:403 n_hdlc_tty_wakeup+0xa0/0xc0 drivers/tty/n_hdlc.c:479 tty_wakeup+0xd4/0x110 drivers/tty/tty_io.c:534 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 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 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:23 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:67 [inline] RIP: 0010:write_comp_data+0xf/0x70 kernel/kcov.c:122 Code: 8b 11 48 83 c2 01 48 39 d0 76 07 48 89 34 d1 48 89 11 c3 0f 1f 84 00 00 00 00 00 49 89 f1 49 89 fa 65 48 8b 34 25 c0 df 01 00 <65> 8b 05 7a 59 9f 7e a9 00 01 1f 00 75 4f 8b 86 60 13 00 00 83 f8 RSP: 0018:ffff88804c9a7168 EFLAGS: 00000206 ORIG_RAX: ffffffffffffffdb RAX: 0000000000040000 RBX: ffff8880a962380a RCX: ffffffff87f027c3 RDX: fffffffffffffff5 RSI: ffff88804c02c380 RDI: 0000000000000007 RBP: 000000000000000a R08: 0000000000000004 R09: 0000000000000000 R10: 0000000000000007 R11: 000000007e9bae8a R12: fffffffffffffff5 R13: 0000000000000021 R14: 0000000000000009 R15: dffffc0000000000 string+0x153/0x220 lib/vsprintf.c:629 vsnprintf+0x71b/0x14f0 lib/vsprintf.c:2319 kvasprintf+0x9c/0x150 lib/kasprintf.c:22 kasprintf+0xbb/0xf0 lib/kasprintf.c:59 ieee80211_alloc_led_names+0x23f/0x420 net/mac80211/led.c:43 ieee80211_alloc_hw_nm+0x17b5/0x1d40 net/mac80211/main.c:695 mac80211_hwsim_new_radio+0x1ca/0x3c60 drivers/net/wireless/mac80211_hwsim.c:2659 hwsim_new_radio_nl+0x5c3/0x850 drivers/net/wireless/mac80211_hwsim.c:3374 genl_family_rcv_msg+0x642/0xc40 net/netlink/genetlink.c:602 genl_rcv_msg+0xbf/0x160 net/netlink/genetlink.c:627 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 genl_rcv+0x24/0x40 net/netlink/genetlink.c:638 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f7c14e98409 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7c1380d168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7c14faaf80 RCX: 00007f7c14e98409 RDX: 0000000000000000 RSI: 0000000020000400 RDI: 0000000000000004 RBP: 00007f7c14ef3367 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc8c08d5af R14: 00007f7c1380d300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 8b 11 mov (%rcx),%edx 2: 48 83 c2 01 add $0x1,%rdx 6: 48 39 d0 cmp %rdx,%rax 9: 76 07 jbe 0x12 b: 48 89 34 d1 mov %rsi,(%rcx,%rdx,8) f: 48 89 11 mov %rdx,(%rcx) 12: c3 retq 13: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 1a: 00 1b: 49 89 f1 mov %rsi,%r9 1e: 49 89 fa mov %rdi,%r10 21: 65 48 8b 34 25 c0 df mov %gs:0x1dfc0,%rsi 28: 01 00 * 2a: 65 8b 05 7a 59 9f 7e mov %gs:0x7e9f597a(%rip),%eax # 0x7e9f59ab <-- trapping instruction 31: a9 00 01 1f 00 test $0x1f0100,%eax 36: 75 4f jne 0x87 38: 8b 86 60 13 00 00 mov 0x1360(%rsi),%eax 3e: 83 .byte 0x83 3f: f8 clc