================================ WARNING: inconsistent lock state 6.1.94-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-fuzzer/3559 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9935e90 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9935e90 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x84/0x670 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_write_lock_killable include/linux/mmap_lock.h:88 [inline] dup_mmap kernel/fork.c:593 [inline] dup_mm kernel/fork.c:1540 [inline] copy_mm+0x192e/0x19c0 kernel/fork.c:1589 copy_process+0x19d5/0x4060 kernel/fork.c:2267 kernel_clone+0x222/0x920 kernel/fork.c:2682 __do_sys_clone kernel/fork.c:2823 [inline] __se_sys_clone kernel/fork.c:2807 [inline] __x64_sys_clone+0x231/0x280 kernel/fork.c:2807 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 irq event stamp: 291889 hardirqs last enabled at (291888): [] __local_bh_enable_ip+0x164/0x1f0 kernel/softirq.c:401 hardirqs last disabled at (291889): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (291889): [] _raw_spin_lock_irqsave+0xac/0x120 kernel/locking/spinlock.c:162 softirqs last enabled at (291848): [] tcp_sendmsg+0x36/0x40 net/ipv4/tcp.c:1490 softirqs last disabled at (291855): [] __do_softirq kernel/softirq.c:605 [inline] softirqs last disabled at (291855): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (291855): [] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:654 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 5 locks held by syz-fuzzer/3559: #0: ffff888074e79c68 (&pipe->mutex/1){+.+.}-{3:3}, at: __pipe_lock fs/pipe.c:103 [inline] #0: ffff888074e79c68 (&pipe->mutex/1){+.+.}-{3:3}, at: pipe_write+0x1b6/0x1af0 fs/pipe.c:443 #1: ffff888078899930 (slock-AF_INET){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff888078899930 (slock-AF_INET){+.-.}-{2:2}, at: tcp_tsq_handler+0x20/0x200 net/ipv4/tcp_output.c:1029 #2: ffff8880b9928358 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:999 #3: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8d12acc0 (rcu_read_lock){....}-{1:2}, at: trace_call_bpf+0xbe/0x6a0 kernel/trace/bpf_trace.c:134 #4: ffff88807561f1d8 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #4: ffff88807561f1d8 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 1 PID: 3559 Comm: syz-fuzzer Not tainted 6.1.94-syzkaller #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+0x1e3/0x2cb lib/dump_stack.c:106 valid_state+0x136/0x1c0 kernel/locking/lockdep.c:3969 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4172 mark_lock+0x21c/0x340 kernel/locking/lockdep.c:4628 __lock_acquire+0xb7f/0x1f80 kernel/locking/lockdep.c:5003 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 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] stack_map_get_build_id_offset+0x99e/0x9c0 kernel/bpf/stackmap.c:144 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:452 bpf_prog_e6cf5f9c69743609+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] bpf_prog_run_array include/linux/bpf.h:1635 [inline] trace_call_bpf+0x345/0x6a0 kernel/trace/bpf_trace.c:135 perf_trace_run_bpf_submit+0x7b/0x1d0 kernel/events/core.c:9924 perf_trace_timer_class+0x2c8/0x380 include/trace/events/timer.h:12 trace_timer_cancel include/trace/events/timer.h:138 [inline] debug_deactivate kernel/time/timer.c:832 [inline] detach_timer+0x2f4/0x380 kernel/time/timer.c:878 detach_if_pending kernel/time/timer.c:899 [inline] __mod_timer+0x407/0xee0 kernel/time/timer.c:1076 sk_reset_timer+0x1f/0xb0 net/core/sock.c:3371 inet_csk_reset_xmit_timer include/net/inet_connection_sock.h:234 [inline] tcp_reset_xmit_timer include/net/tcp.h:1347 [inline] tcp_schedule_loss_probe+0x410/0x550 net/ipv4/tcp_output.c:2791 tcp_write_xmit+0x3d7e/0x64c0 net/ipv4/tcp_output.c:2740 tcp_tsq_handler+0x12d/0x200 net/ipv4/tcp_output.c:1031 tcp_tasklet_func+0x4ef/0x570 net/ipv4/tcp_output.c:1063 tasklet_action_common+0x3cb/0x4a0 handle_softirqs+0x2ee/0xa40 kernel/softirq.c:571 __do_softirq kernel/softirq.c:605 [inline] invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:654 irq_exit_rcu+0x5/0x20 kernel/softirq.c:666 common_interrupt+0xa4/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:644 RIP: 0010:arch_atomic_long_read include/linux/atomic/atomic-long.h:29 [inline] RIP: 0010:atomic_long_read include/linux/atomic/atomic-instrumented.h:1266 [inline] RIP: 0010:__mutex_trylock_common+0xa7/0x2e0 kernel/locking/mutex.c:107 Code: 7e 48 89 44 24 18 be 08 00 00 00 e8 03 7b 78 00 4c 89 e0 48 c1 e8 03 42 80 3c 30 00 74 08 4c 89 e7 e8 5d 79 78 00 49 8b 1c 24 <4d> 89 fd 49 c1 ed 03 48 c7 c0 60 51 c9 91 48 c1 e8 03 48 89 44 24 RSP: 0018:ffffc90003aaf8a0 EFLAGS: 00000246 RAX: 1ffff1100e9cf380 RBX: 0000000000000000 RCX: ffffffff81699a2d RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff888074e79c00 RBP: ffffc90003aaf970 R08: dffffc0000000000 R09: ffffed100e9cf381 R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888074e79c00 R13: ffff888074e79c00 R14: dffffc0000000000 R15: ffffc90003aaf900 __mutex_trylock kernel/locking/mutex.c:152 [inline] __mutex_lock_common kernel/locking/mutex.c:606 [inline] __mutex_lock+0x14d/0xd80 kernel/locking/mutex.c:747 __pipe_lock fs/pipe.c:103 [inline] pipe_write+0x1b6/0x1af0 fs/pipe.c:443 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x7ae/0xba0 fs/read_write.c:584 ksys_write+0x19c/0x2c0 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x40720e Code: 48 83 ec 38 e8 13 00 00 00 48 83 c4 38 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48 RSP: 002b:000000c0007e3808 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000002e RCX: 000000000040720e RDX: 0000000000000038 RSI: 000000c0007e3a98 RDI: 000000000000002e RBP: 000000c0007e3848 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 000000c0007e3988 R13: 0000000000031fe8 R14: 000000c0006c36c0 R15: 000000c000ca0000 ---------------- Code disassembly (best guess): 0: 7e 48 jle 0x4a 2: 89 44 24 18 mov %eax,0x18(%rsp) 6: be 08 00 00 00 mov $0x8,%esi b: e8 03 7b 78 00 call 0x787b13 10: 4c 89 e0 mov %r12,%rax 13: 48 c1 e8 03 shr $0x3,%rax 17: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) 1c: 74 08 je 0x26 1e: 4c 89 e7 mov %r12,%rdi 21: e8 5d 79 78 00 call 0x787983 26: 49 8b 1c 24 mov (%r12),%rbx * 2a: 4d 89 fd mov %r15,%r13 <-- trapping instruction 2d: 49 c1 ed 03 shr $0x3,%r13 31: 48 c7 c0 60 51 c9 91 mov $0xffffffff91c95160,%rax 38: 48 c1 e8 03 shr $0x3,%rax 3c: 48 rex.W 3d: 89 .byte 0x89 3e: 44 rex.R 3f: 24 .byte 0x24