================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04806-g8b0f0bb27c32 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.3.4072/20968 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c038aa0 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c038aa0 (lock#14){?.+.}-{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:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 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] walk_mm mm/vmscan.c:3648 [inline] try_to_inc_max_seq+0xa52/0x1250 mm/vmscan.c:3888 get_nr_to_scan mm/vmscan.c:4702 [inline] try_to_shrink_lruvec+0x736/0x9b0 mm/vmscan.c:4745 shrink_one+0x3f8/0x7c0 mm/vmscan.c:4788 shrink_many mm/vmscan.c:4851 [inline] lru_gen_shrink_node+0x89f/0x1750 mm/vmscan.c:4951 shrink_node mm/vmscan.c:5910 [inline] kswapd_shrink_node mm/vmscan.c:6720 [inline] balance_pgdat+0x1105/0x1970 mm/vmscan.c:6911 kswapd+0x5ea/0xbf0 mm/vmscan.c:7180 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 irq event stamp: 4100 hardirqs last enabled at (4099): [] __do_fast_syscall_32+0x80/0x120 arch/x86/entry/common.c:389 hardirqs last disabled at (4100): [] irqentry_enter+0x54/0x60 kernel/entry/common.c:243 softirqs last enabled at (3998): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (3998): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (3981): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (3981): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (3981): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (3981): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#14); lock(lock#14); *** DEADLOCK *** 2 locks held by syz.3.4072/20968: #0: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #0: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #0: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #0: ffffffff8dbb4e60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2447 #1: ffff888029a44d98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #1: ffff888029a44d98 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 20968 Comm: syz.3.4072 Not tainted 6.10.0-syzkaller-04806-g8b0f0bb27c32 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5718 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+0x602/0x760 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x68a/0x710 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 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:2406 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:134 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:512 __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: 0023:0xf710a71b Code: 8b 44 24 1c 8b 6c 24 2c 8d b4 26 00 00 00 00 8b 4c 24 10 39 54 24 0c 19 f9 73 2d 89 44 24 10 89 74 24 14 8d 74 26 00 8b 45 08 <8b> 4d 0c 83 c5 08 89 ce 39 d0 19 fe 72 ef 89 44 24 0c 8b 44 24 10 RSP: 002b:00000000ffc56570 EFLAGS: 00000297 RAX: 00000000813cb609 RBX: 00000000ffffffff RCX: 00000000ffffffff RDX: 00000000813cd272 RSI: 00000000ffffffff RDI: 00000000ffffffff RBP: 00000000f66e39b8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 8b 44 24 1c mov 0x1c(%rsp),%eax 4: 8b 6c 24 2c mov 0x2c(%rsp),%ebp 8: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi f: 8b 4c 24 10 mov 0x10(%rsp),%ecx 13: 39 54 24 0c cmp %edx,0xc(%rsp) 17: 19 f9 sbb %edi,%ecx 19: 73 2d jae 0x48 1b: 89 44 24 10 mov %eax,0x10(%rsp) 1f: 89 74 24 14 mov %esi,0x14(%rsp) 23: 8d 74 26 00 lea 0x0(%rsi,%riz,1),%esi 27: 8b 45 08 mov 0x8(%rbp),%eax * 2a: 8b 4d 0c mov 0xc(%rbp),%ecx <-- trapping instruction 2d: 83 c5 08 add $0x8,%ebp 30: 89 ce mov %ecx,%esi 32: 39 d0 cmp %edx,%eax 34: 19 fe sbb %edi,%esi 36: 72 ef jb 0x27 38: 89 44 24 0c mov %eax,0xc(%rsp) 3c: 8b 44 24 10 mov 0x10(%rsp),%eax