================================ WARNING: inconsistent lock state 5.15.159-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/8675 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9a35bb8 (lock#9){?.+.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 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:137 [inline] do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x59c/0x740 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 irq event stamp: 31928 hardirqs last enabled at (31927): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1338 [inline] hardirqs last enabled at (31927): [] finish_lock_switch+0x8f/0x100 kernel/sched/core.c:4784 hardirqs last disabled at (31928): [] sysvec_call_function_single+0xa/0xb0 arch/x86/kernel/smp.c:243 softirqs last enabled at (31924): [] __tipc_sendstream+0x65f/0x14a0 net/tipc/socket.c:1586 softirqs last disabled at (31922): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (31922): [] release_sock+0x2c/0x1c0 net/core/sock.c:3263 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#9); lock(lock#9); *** DEADLOCK *** 1 lock held by syz-executor.1/8675: #0: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 0 PID: 8675 Comm: syz-executor.1 Not tainted 5.15.159-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 mark_usage kernel/locking/lockdep.c:4483 [inline] __lock_acquire+0xb5c/0x1ff0 kernel/locking/lockdep.c:4966 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_start_locking+0x7a/0x320 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:135 [inline] stack_map_get_build_id_offset+0x5ea/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_ec3b2eefa702d8d3+0x3a/0x9d0 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 trace_tlb_flush+0xed/0x110 include/trace/events/tlb.h:38 flush_tlb_func+0x480/0x590 arch/x86/mm/tlb.c:851 flush_smp_call_function_queue+0x2b5/0x760 kernel/smp.c:628 __sysvec_call_function_single+0x9a/0x250 arch/x86/kernel/smp.c:248 sysvec_call_function_single+0x89/0xb0 arch/x86/kernel/smp.c:243 asm_sysvec_call_function_single+0x16/0x20 arch/x86/include/asm/idtentry.h:646 RIP: 0010:finish_lock_switch+0x91/0x100 kernel/sched/core.c:4785 Code: 45 31 c9 68 b7 90 59 81 e8 cc 1a 09 00 48 83 c4 08 4c 89 ff e8 60 da fe ff 66 90 4c 89 ff e8 f6 ea cd 08 e8 d1 4b 2d 00 fb 5b <41> 5c 41 5d 41 5e 41 5f c3 44 89 f1 80 e1 07 80 c1 03 38 c1 7c 87 RSP: 0018:ffffc900014ef3d8 EFLAGS: 00000286 RAX: 546a2306056c1d00 RBX: ffff888021223bb4 RCX: ffffffff913eff03 RDX: dffffc0000000000 RSI: ffffffff8a8b2980 RDI: ffffffff8ad8f680 RBP: ffffc900014ef450 R08: ffffffff8186dcf0 R09: ffffed1017347469 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 1ffff11017347613 R14: ffff8880b9a3b098 R15: ffff8880b9a3a340 finish_task_switch+0x134/0x630 kernel/sched/core.c:4902 context_switch kernel/sched/core.c:5033 [inline] __schedule+0x12cc/0x45b0 kernel/sched/core.c:6376 schedule+0x11b/0x1f0 kernel/sched/core.c:6459 schedule_timeout+0xac/0x300 kernel/time/timer.c:1890 wait_woken+0xcb/0x1b0 kernel/sched/wait.c:460 __tipc_sendstream+0x694/0x14a0 net/tipc/socket.c:1586 tipc_sendstream+0x51/0x70 net/tipc/socket.c:1550 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2431 ___sys_sendmsg+0x252/0x2e0 net/socket.c:2485 __sys_sendmsg net/socket.c:2514 [inline] __do_sys_sendmsg net/socket.c:2523 [inline] __se_sys_sendmsg+0x19a/0x260 net/socket.c:2521 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f0a34819ee9 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:00007f0a32d6c0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f0a34949050 RCX: 00007f0a34819ee9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000007 RBP: 00007f0a3486649e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f0a34949050 R15: 00007ffc79a283f8 ---------------- Code disassembly (best guess): 0: 45 31 c9 xor %r9d,%r9d 3: 68 b7 90 59 81 push $0xffffffff815990b7 8: e8 cc 1a 09 00 call 0x91ad9 d: 48 83 c4 08 add $0x8,%rsp 11: 4c 89 ff mov %r15,%rdi 14: e8 60 da fe ff call 0xfffeda79 19: 66 90 xchg %ax,%ax 1b: 4c 89 ff mov %r15,%rdi 1e: e8 f6 ea cd 08 call 0x8cdeb19 23: e8 d1 4b 2d 00 call 0x2d4bf9 28: fb sti 29: 5b pop %rbx * 2a: 41 5c pop %r12 <-- trapping instruction 2c: 41 5d pop %r13 2e: 41 5e pop %r14 30: 41 5f pop %r15 32: c3 ret 33: 44 89 f1 mov %r14d,%ecx 36: 80 e1 07 and $0x7,%cl 39: 80 c1 03 add $0x3,%cl 3c: 38 c1 cmp %al,%cl 3e: 7c 87 jl 0xffffffc7