============================================ WARNING: possible recursive locking detected 4.19.211-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/28121 is trying to acquire lock: 00000000497cf058 (&port_lock_key){-.-.}, at: uart_write+0x1ce/0x6f0 drivers/tty/serial/serial_core.c:591 but task is already holding lock: 00000000497cf058 (&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 6 locks held by syz-executor.1/28121: #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: spin_lock include/linux/spinlock.h:329 [inline] #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pte_range mm/memory.c:1311 [inline] #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pmd_range mm/memory.c:1463 [inline] #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_pud_range mm/memory.c:1492 [inline] #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: zap_p4d_range mm/memory.c:1513 [inline] #0: 000000002fc804e7 (&(ptlock_ptr(page))->rlock#2){+.+.}, at: unmap_page_range+0xa19/0x2c50 mm/memory.c:1534 #1: 00000000954f11f1 (rcu_read_lock){....}, at: ieee80211_iterate_active_interfaces_atomic+0x0/0x170 net/mac80211/util.c:637 #2: 00000000954f11f1 (rcu_read_lock){....}, at: __ieee80211_beacon_get+0x0/0x1a30 include/linux/compiler.h:263 #3: 00000000d989eb3c (&(&i->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #3: 00000000d989eb3c (&(&i->lock)->rlock){-.-.}, at: serial8250_interrupt+0x3a/0x240 drivers/tty/serial/8250/8250_core.c:115 #4: 00000000497cf058 (&port_lock_key){-.-.}, at: serial8250_handle_irq.part.0+0x21/0x3d0 drivers/tty/serial/8250/8250_port.c:1876 #5: 000000007cce5934 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref+0x1d/0x80 drivers/tty/tty_ldisc.c:293 stack backtrace: CPU: 1 PID: 28121 Comm: syz-executor.1 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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:filter_irq_stacks mm/kasan/kasan.c:428 [inline] RIP: 0010:save_stack mm/kasan/kasan.c:449 [inline] RIP: 0010:set_track mm/kasan/kasan.c:460 [inline] RIP: 0010:kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:553 Code: 8b 80 d0 04 00 00 48 01 f5 89 45 00 48 b8 00 00 00 00 40 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 e8 75 9c 8a ff <8b> 44 24 08 85 c0 74 39 48 8b 74 24 10 31 c9 48 63 d1 48 8b 14 d6 RSP: 0018:ffff8880ba107910 EFLAGS: 00000286 ORIG_RAX: ffffffffffffffd2 RAX: 0000000000000000 RBX: ffff88809a06e980 RCX: 000000000000001e RDX: ffff8880ba107930 RSI: 0000000000000004 RDI: 0000000000000286 RBP: ffff88809a06e980 R08: 0000000000000000 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000074071 R12: 0000000000490220 R13: 0000000000000000 R14: ffff88813bff0940 R15: 0000000000000200 __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/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] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:__sanitizer_cov_trace_pc+0x22/0x50 kernel/kcov.c:101 Code: 90 90 90 90 90 90 90 90 48 8b 34 24 65 48 8b 04 25 c0 df 01 00 65 8b 15 cc 59 9f 7e 81 e2 00 01 1f 00 75 2b 8b 90 60 13 00 00 <83> fa 02 75 20 48 8b 88 68 13 00 00 8b 80 64 13 00 00 48 8b 11 48 RSP: 0018:ffff88802cdcf730 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff88804eb4c580 RBX: ffff88802cdcf9b0 RCX: ffffffff818b340e RDX: 0000000000000000 RSI: ffffffff818b341c RDI: 0000000000000004 RBP: 00000000000001fe R08: 0000000000000000 R09: 00000000000001fe R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000087 R14: ffffea0000bc8980 R15: ffff88802cdcf9d8 __tlb_remove_page_size+0x17c/0x470 mm/memory.c:322 __tlb_remove_page include/asm-generic/tlb.h:161 [inline] zap_pte_range mm/memory.c:1353 [inline] zap_pmd_range mm/memory.c:1463 [inline] zap_pud_range mm/memory.c:1492 [inline] zap_p4d_range mm/memory.c:1513 [inline] unmap_page_range+0x14e7/0x2c50 mm/memory.c:1534 unmap_single_vma+0x198/0x300 mm/memory.c:1579 unmap_vmas+0xa9/0x180 mm/memory.c:1609 exit_mmap+0x2b9/0x530 mm/mmap.c:3093 __mmput kernel/fork.c:1016 [inline] mmput+0x14e/0x4a0 kernel/fork.c:1037 exit_mm kernel/exit.c:549 [inline] do_exit+0xaec/0x2be0 kernel/exit.c:857 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff2abcb4649 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:00007ff2aa628218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007ff2abdc5f88 RCX: 00007ff2abcb4649 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007ff2abdc5f88 RBP: 00007ff2abdc5f80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff2abdc5f8c R13: 00007fff62cf192f R14: 00007ff2aa628300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 8b 80 d0 04 00 00 mov 0x4d0(%rax),%eax 6: 48 01 f5 add %rsi,%rbp 9: 89 45 00 mov %eax,0x0(%rbp) c: 48 b8 00 00 00 00 40 movabs $0x4000000000,%rax 13: 00 00 00 16: 48 89 44 24 08 mov %rax,0x8(%rsp) 1b: 48 8d 44 24 20 lea 0x20(%rsp),%rax 20: 48 89 44 24 10 mov %rax,0x10(%rsp) 25: e8 75 9c 8a ff callq 0xff8a9c9f * 2a: 8b 44 24 08 mov 0x8(%rsp),%eax <-- trapping instruction 2e: 85 c0 test %eax,%eax 30: 74 39 je 0x6b 32: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 37: 31 c9 xor %ecx,%ecx 39: 48 63 d1 movslq %ecx,%rdx 3c: 48 8b 14 d6 mov (%rsi,%rdx,8),%rdx