================================ WARNING: inconsistent lock state 6.10.0-syzkaller-08676-g720261cfc732 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.3.2533/14257 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802c238aa0 (lock#14){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88802c238aa0 (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:5759 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724 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_lock include/linux/mmap_lock.h:145 [inline] get_arg_page+0x1f0/0x640 fs/exec.c:221 remove_arg_zero+0x96/0x250 fs/exec.c:1775 load_script+0x26b/0x790 fs/binfmt_script.c:106 search_binary_handler fs/exec.c:1821 [inline] exec_binprm fs/exec.c:1863 [inline] bprm_execve fs/exec.c:1914 [inline] bprm_execve+0x703/0x1960 fs/exec.c:1890 do_execveat_common.isra.0+0x4f1/0x630 fs/exec.c:2021 do_execve fs/exec.c:2095 [inline] __do_sys_execve fs/exec.c:2171 [inline] __se_sys_execve fs/exec.c:2166 [inline] __x64_sys_execve+0x8c/0xb0 fs/exec.c:2166 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 irq event stamp: 47428 hardirqs last enabled at (47427): [] __raw_write_unlock_irq include/linux/rwlock_api_smp.h:273 [inline] hardirqs last enabled at (47427): [] _raw_write_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:358 hardirqs last disabled at (47428): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (43594): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (43594): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (43565): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (43565): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (43565): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (43565): [] 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 *** 3 locks held by syz.3.2533/14257: #0: ffff88805b503068 (&ep->mtx){+.+.}-{3:3}, at: ep_send_events fs/eventpoll.c:1835 [inline] #0: ffff88805b503068 (&ep->mtx){+.+.}-{3:3}, at: ep_poll fs/eventpoll.c:2005 [inline] #0: ffff88805b503068 (&ep->mtx){+.+.}-{3:3}, at: do_epoll_wait+0xaba/0x1ae0 fs/eventpoll.c:2464 #1: ffffffff8dbb4f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #1: ffffffff8dbb4f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #1: ffffffff8dbb4f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #1: ffffffff8dbb4f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2447 #2: ffff888025839498 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #2: ffff888025839498 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x28a/0x760 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 2 PID: 14257 Comm: syz.3.2533 Not tainted 6.10.0-syzkaller-08676-g720261cfc732 #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+0x1419/0x3cb0 kernel/locking/lockdep.c:5096 lock_acquire kernel/locking/lockdep.c:5759 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724 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+0x90/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:__raw_write_unlock_irq include/linux/rwlock_api_smp.h:274 [inline] RIP: 0010:_raw_write_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:358 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 2a 59 84 f6 48 89 df e8 42 e0 84 f6 e8 5d 8c ad f6 fb bf 01 00 00 00 32 53 76 f6 65 8b 05 b3 af 1b 75 85 c0 74 06 5b c3 cc cc cc cc RSP: 0018:ffffc90002a07c40 EFLAGS: 00000202 RAX: 000000000000b943 RBX: ffff88805b503140 RCX: 1ffffffff2851129 RDX: 0000000000000000 RSI: ffffffff8b2cc020 RDI: 0000000000000001 RBP: ffffc90002a07d58 R08: 0000000000000001 R09: fffffbfff2847e7f R10: ffffffff9423f3ff R11: 0000000000000000 R12: ffff888026afd180 R13: ffff888026afd198 R14: ffff88805b503000 R15: dffffc0000000000 ep_send_events fs/eventpoll.c:1903 [inline] ep_poll fs/eventpoll.c:2005 [inline] do_epoll_wait+0x1526/0x1ae0 fs/eventpoll.c:2464 __do_sys_epoll_wait fs/eventpoll.c:2476 [inline] __se_sys_epoll_wait fs/eventpoll.c:2471 [inline] __ia32_sys_epoll_wait+0x194/0x290 fs/eventpoll.c:2471 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f10579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f5a6156c EFLAGS: 00000296 ORIG_RAX: 0000000000000100 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000020000040 RDX: 0000000000000001 RSI: 0000000000000400 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 53 push %rbx 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fb mov %rdi,%rbx e: 48 83 c7 18 add $0x18,%rdi 12: e8 2a 59 84 f6 call 0xf6845941 17: 48 89 df mov %rbx,%rdi 1a: e8 42 e0 84 f6 call 0xf684e061 1f: e8 5d 8c ad f6 call 0xf6ad8c81 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 32 53 76 f6 call 0xf6765361 <-- trapping instruction 2f: 65 8b 05 b3 af 1b 75 mov %gs:0x751bafb3(%rip),%eax # 0x751bafe9 36: 85 c0 test %eax,%eax 38: 74 06 je 0x40 3a: 5b pop %rbx 3b: c3 ret 3c: cc int3 3d: cc int3 3e: cc int3 3f: cc int3