================================ WARNING: inconsistent lock state 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.2/5567 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff8880b9238ac0 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9238ac0 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:164 [inline] get_mmap_lock_carefully mm/memory.c:5715 [inline] lock_mm_and_find_vma+0xeb/0x6a0 mm/memory.c:5775 do_user_addr_fault+0x29c/0xe50 arch/x86/mm/fault.c:1361 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 __put_user_4+0x11/0x20 arch/x86/lib/putuser.S:86 schedule_tail+0xa6/0xd0 kernel/sched/core.c:5343 ret_from_fork+0x23/0x80 arch/x86/kernel/process.c:143 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 irq event stamp: 413 hardirqs last enabled at (412): [] kcov_remote_start+0x3d1/0x6e0 kernel/kcov.c:922 hardirqs last disabled at (413): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (132): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (132): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (215): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (215): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (215): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (215): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 6 locks held by syz-executor.2/5567: #0: ffff88802ca0d718 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] #0: ffff88802ca0d718 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x160/0x360 mm/util.c:571 #1: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: __pte_offset_map+0x42/0x540 mm/pgtable-generic.c:287 #2: ffff88802b7e58b8 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88802b7e58b8 (ptlock_ptr(ptdesc)#2){+.+.}-{2:2}, at: __pte_offset_map_lock+0xf1/0x300 mm/pgtable-generic.c:375 #3: ffff8880b9238b00 (lock#5){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] #3: ffff8880b9238b00 (lock#5){+.+.}-{2:2}, at: munlock_folio+0x74/0x6b0 mm/mlock.c:294 #4: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: ieee80211_rx_napi+0xa6/0x400 net/mac80211/rx.c:5481 #5: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #5: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #5: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #5: ffffffff8dbb5be0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 stack backtrace: CPU: 0 PID: 5567 Comm: syz-executor.2 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:164 [inline] stack_map_get_build_id_offset+0x5d9/0x7c0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x6bf/0x700 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1984 bpf_prog_e6cf5f9c69743609+0x42/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline] bpf_trace_run2+0x234/0x590 kernel/trace/bpf_trace.c:2444 __bpf_trace_tlb_flush+0xd2/0x110 include/trace/events/tlb.h:38 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x27d/0x8c0 kernel/smp.c:511 __sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x43/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:unwind_next_frame+0x6c5/0x23a0 arch/x86/kernel/unwind_orc.c:515 Code: 7f 08 84 c0 0f 85 00 18 00 00 44 88 6b 35 41 0f b6 7c 24 04 48 c7 c6 a0 cb 29 8b 41 89 fd 83 e7 0f e8 3f 4c 52 00 41 83 e5 0f <41> 80 fd 06 0f 84 8d 10 00 00 0f 87 f6 02 00 00 41 80 fd 04 0f 84 RSP: 0018:ffffc900000070c8 EFLAGS: 00000206 RAX: 0000000000000000 RBX: ffffc90000007148 RCX: ffffffff813cddc1 RDX: ffff88802e5abc00 RSI: 0000000000000009 RDI: 0000000000000001 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000005 R12: ffffffff908061d6 R13: 0000000000000005 R14: ffffffff908061da R15: ffffc9000000717d arch_stack_walk+0x100/0x170 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4122 [inline] __kmalloc_noprof+0x1ec/0x410 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] cfg80211_inform_single_bss_data+0x51d/0x2080 net/wireless/scan.c:2265 cfg80211_inform_bss_data+0x205/0x39d0 net/wireless/scan.c:3117 cfg80211_inform_bss_frame_data+0x271/0x7c0 net/wireless/scan.c:3207 ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226 ieee80211_scan_rx+0x47c/0xad0 net/mac80211/scan.c:340 __ieee80211_rx_handle_packet net/mac80211/rx.c:5222 [inline] ieee80211_rx_list+0x1be1/0x2e90 net/mac80211/rx.c:5459 ieee80211_rx_napi+0xdd/0x400 net/mac80211/rx.c:5482 ieee80211_rx include/net/mac80211.h:5093 [inline] ieee80211_handle_queued_frames+0xd5/0x130 net/mac80211/main.c:437 tasklet_action_common.constprop.0+0x24f/0x3e0 kernel/softirq.c:785 handle_softirqs+0x219/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lock_acquire+0x1f2/0x560 kernel/locking/lockdep.c:5722 Code: c1 05 3a 65 95 7e 83 f8 01 0f 85 ea 02 00 00 9c 58 f6 c4 02 0f 85 d5 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffffc900090b7310 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff92001216e64 RCX: ffffffff816c2fae RDX: 0000000000000001 RSI: ffffffff8b2cc4a0 RDI: ffffffff8b903240 RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff2850a65 R10: ffffffff9428532f R11: 0000000000000003 R12: 0000000000000001 R13: 0000000000000000 R14: ffff8880b9238b00 R15: 0000000000000000 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] munlock_folio+0x8c/0x6b0 mm/mlock.c:294 munlock_vma_folio mm/internal.h:880 [inline] __folio_remove_rmap mm/rmap.c:1578 [inline] folio_remove_rmap_ptes+0x38c/0x400 mm/rmap.c:1595 zap_present_folio_ptes mm/memory.c:1505 [inline] zap_present_ptes mm/memory.c:1570 [inline] zap_pte_range mm/memory.c:1612 [inline] zap_pmd_range mm/memory.c:1730 [inline] zap_pud_range mm/memory.c:1759 [inline] zap_p4d_range mm/memory.c:1780 [inline] unmap_page_range+0x1a15/0x41e0 mm/memory.c:1801 unmap_single_vma+0x194/0x2b0 mm/memory.c:1847 unmap_vmas+0x22f/0x490 mm/memory.c:1891 unmap_region+0x1f3/0x420 mm/mmap.c:2365 do_vmi_align_munmap+0x1107/0x19c0 mm/mmap.c:2683 do_vmi_munmap+0x231/0x410 mm/mmap.c:2759 mmap_region+0x17f/0x2760 mm/mmap.c:2810 do_mmap+0xbc7/0xf60 mm/mmap.c:1397 vm_mmap_pgoff+0x1ba/0x360 mm/util.c:573 ksys_mmap_pgoff+0x7d/0x5d0 mm/mmap.c:1443 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:79 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:79 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:0x7f5352e7cea9 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:00007f5353bc30c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f5352fb4050 RCX: 00007f5352e7cea9 RDX: 0000000000000000 RSI: 0000000000fbe000 RDI: 0000000020000000 RBP: 00007f5352eebff4 R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000000031 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f5352fb4050 R15: 00007ffd661c1ca8 ---------------- Code disassembly (best guess): 0: 7f 08 jg 0xa 2: 84 c0 test %al,%al 4: 0f 85 00 18 00 00 jne 0x180a a: 44 88 6b 35 mov %r13b,0x35(%rbx) e: 41 0f b6 7c 24 04 movzbl 0x4(%r12),%edi 14: 48 c7 c6 a0 cb 29 8b mov $0xffffffff8b29cba0,%rsi 1b: 41 89 fd mov %edi,%r13d 1e: 83 e7 0f and $0xf,%edi 21: e8 3f 4c 52 00 call 0x524c65 26: 41 83 e5 0f and $0xf,%r13d * 2a: 41 80 fd 06 cmp $0x6,%r13b <-- trapping instruction 2e: 0f 84 8d 10 00 00 je 0x10c1 34: 0f 87 f6 02 00 00 ja 0x330 3a: 41 80 fd 04 cmp $0x4,%r13b 3e: 0f .byte 0xf 3f: 84 .byte 0x84