audit: type=1804 audit(1677002204.180:8832): pid=6992 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.3" name="/root/syzkaller-testdir4054327192/syzkaller.Yht6cr/356/bus" dev="sda1" ino=14963 res=1 ============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted audit: type=1804 audit(1677002204.240:8833): pid=6995 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.1" name="/root/syzkaller-testdir4211830974/syzkaller.pk13cn/2383/bus" dev="sda1" ino=14980 res=1 -------------------------------------------- kworker/u4:3/271 is trying to acquire lock: 000000002e323762 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 000000002e323762 (&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 7 locks held by kworker/u4:3/271: #0: 00000000f8ae340d ((wq_completion)"events_unbound"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124 #1: 000000007786584e ((work_completion)(&buf->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128 #2: 000000000ca28743 (rcu_read_lock){....}, at: ieee80211_iterate_active_interfaces_atomic+0x0/0x170 net/mac80211/util.c:637 #3: 000000000ca28743 (rcu_read_lock){....}, at: __ieee80211_beacon_get+0x0/0x1a30 include/linux/compiler.h:263 #4: 000000008a3ca284 (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #4: 000000008a3ca284 (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #5: 000000002e323762 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 #6: 000000004471e312 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 271 Comm: kworker/u4:3 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Workqueue: events_unbound flush_to_ldisc 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:orc_find arch/x86/kernel/unwind_orc.c:149 [inline] RIP: 0010:unwind_next_frame+0x22b/0x1400 arch/x86/kernel/unwind_orc.c:422 Code: 70 40 88 0f 83 40 01 00 00 44 8b 1d df de 3c 0b 4c 89 fe 48 81 ee 00 00 00 81 48 c1 ee 08 41 8d 43 ff 39 c6 0f 83 06 0e 00 00 <48> b8 00 00 00 00 00 fc ff df 89 f2 48 8d 3c 95 bc 91 17 8c 48 89 RSP: 0018:ffff8880ba107708 EFLAGS: 00000287 ORIG_RAX: ffffffffffffffd5 RAX: 0000000000074070 RBX: 1ffff11017420eea RCX: 1ffff11017420f10 RDX: dffffc0000000000 RSI: 000000000006a444 RDI: 0000000000000001 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000001 R10: ffff8880ba107897 R11: 0000000000074071 R12: ffff8880ba107880 R13: ffff8880ba10786d R14: ffff8880ba107838 R15: ffffffff87a444d0 __save_stack_trace+0x9f/0x190 arch/x86/kernel/stacktrace.c:44 save_stack mm/kasan/kasan.c:448 [inline] set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 kmem_cache_alloc_node_trace+0x151/0x3b0 mm/slab.c:3668 __do_kmalloc_node mm/slab.c:3688 [inline] __kmalloc_node_track_caller+0x38/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 __netdev_alloc_skb+0x76/0x460 net/core/skbuff.c:407 netdev_alloc_skb include/linux/skbuff.h:2680 [inline] dev_alloc_skb include/linux/skbuff.h:2693 [inline] __ieee80211_beacon_get+0xc7d/0x1a30 net/mac80211/tx.c:4352 ieee80211_beacon_get_tim+0x88/0x890 net/mac80211/tx.c:4463 ieee80211_beacon_get include/net/mac80211.h:4484 [inline] mac80211_hwsim_beacon_tx+0xff/0x680 drivers/net/wireless/mac80211_hwsim.c:1577 __iterate_interfaces+0x2e1/0x4a0 net/mac80211/util.c:614 ieee80211_iterate_active_interfaces_atomic+0x8d/0x170 net/mac80211/util.c:650 mac80211_hwsim_beacon+0xc9/0x190 drivers/net/wireless/mac80211_hwsim.c:1615 __tasklet_hrtimer_trampoline+0x29/0xa0 kernel/softirq.c:601 tasklet_action_common.constprop.0+0x265/0x360 kernel/softirq.c:522 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] do_IRQ+0x10c/0x1c0 arch/x86/kernel/irq.c:258 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:process_one_work+0x85d/0x1570 kernel/workqueue.c:2153 Code: 84 db 0f 85 7e 05 00 00 e8 70 4a 24 00 48 8b 54 24 08 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 d9 0b 00 00 <48> 89 ef 41 ff 55 18 0f 1f 44 00 00 e8 42 4a 24 00 e8 3d 4a 24 00 RSP: 0018:ffff8880b4d8fd40 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffd5 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff813e40d5 RDX: 1ffff11016a601a3 RSI: ffffffff813e3b00 RDI: 0000000000000001 RBP: ffff8880af380b28 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88813bfc2990 R13: ffff8880b5300d00 R14: ffff88813bfc2940 R15: ffff88813bfce000 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 ---------------- Code disassembly (best guess), 3 bytes skipped: 0: 0f 83 40 01 00 00 jae 0x146 6: 44 8b 1d df de 3c 0b mov 0xb3cdedf(%rip),%r11d # 0xb3cdeec d: 4c 89 fe mov %r15,%rsi 10: 48 81 ee 00 00 00 81 sub $0xffffffff81000000,%rsi 17: 48 c1 ee 08 shr $0x8,%rsi 1b: 41 8d 43 ff lea -0x1(%r11),%eax 1f: 39 c6 cmp %eax,%esi 21: 0f 83 06 0e 00 00 jae 0xe2d * 27: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax <-- trapping instruction 2e: fc ff df 31: 89 f2 mov %esi,%edx 33: 48 8d 3c 95 bc 91 17 lea -0x73e86e44(,%rdx,4),%rdi 3a: 8c 3b: 48 rex.W 3c: 89 .byte 0x89