================================ WARNING: inconsistent lock state 6.9.0-rc5-syzkaller-00355-g2c8159388952 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/5086 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9538a80 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538a80 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {SOFTIRQ-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_lock include/linux/mmap_lock.h:147 [inline] exit_mm kernel/exit.c:545 [inline] do_exit+0xee4/0x2c10 kernel/exit.c:865 __do_sys_exit kernel/exit.c:994 [inline] __se_sys_exit kernel/exit.c:992 [inline] __x64_sys_exit+0x42/0x50 kernel/exit.c:992 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 349481 hardirqs last enabled at (349480): [] __do_softirq+0x1d6/0x922 kernel/softirq.c:538 hardirqs last disabled at (349481): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (349481): [] _raw_spin_lock_irq+0x45/0x50 kernel/locking/spinlock.c:170 softirqs last enabled at (349402): [] tcp_close+0x30/0x130 net/ipv4/tcp.c:2933 softirqs last disabled at (349479): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (349479): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (349479): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 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-executor.3/5086: #0: ffffc90000a08cb0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0x11a/0x610 kernel/time/timer.c:1790 #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xf2/0x1020 kernel/workqueue.c:2324 #2: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x39e/0x1020 kernel/workqueue.c:2360 #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2380 [inline] #3: ffffffff8d7b0e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0xf8/0x440 kernel/trace/bpf_trace.c:2421 #4: ffff888077bcbaa0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:165 [inline] #4: ffff888077bcbaa0 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 5086 Comm: syz-executor.3 Not tainted 6.9.0-rc5-syzkaller-00355-g2c8159388952 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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:4567 [inline] __lock_acquire+0x13d4/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:166 [inline] stack_map_get_build_id_offset+0x5df/0x7d0 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:1985 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1975 ___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:1997 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2236 bpf_dispatcher_nop_func include/linux/bpf.h:1234 [inline] __bpf_prog_run include/linux/filter.h:657 [inline] bpf_prog_run include/linux/filter.h:664 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2381 [inline] bpf_trace_run3+0x167/0x440 kernel/trace/bpf_trace.c:2421 __bpf_trace_workqueue_queue_work+0x101/0x140 include/trace/events/workqueue.h:23 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0x627/0x1020 kernel/workqueue.c:2382 call_timer_fn+0x1a0/0x610 kernel/time/timer.c:1793 expire_timers kernel/time/timer.c:1839 [inline] __run_timers+0x567/0xaf0 kernel/time/timer.c:2418 __run_timer_base kernel/time/timer.c:2429 [inline] __run_timer_base kernel/time/timer.c:2422 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2438 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2448 __do_softirq+0x218/0x922 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 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:unwind_next_frame+0x5f/0x23a0 arch/x86/kernel/unwind_orc.c:682 Code: 0f 8e 0f 0d 00 00 8b 2b 31 ff 89 ee e8 fa a3 50 00 85 ed 75 1c 31 db e8 0f a9 50 00 89 d8 48 83 c4 40 5b 5d 41 5c 41 5d 41 5e <41> 5f c3 cc cc cc cc e8 f5 a8 50 00 48 8d 43 48 48 89 c2 48 89 04 RSP: 0018:ffffc90003277970 EFLAGS: 00000286 RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffff813d28cf RDX: ffff888028c3da00 RSI: ffffffff813d1721 RDI: 0000000000000005 RBP: ffffc90003277a18 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000080000000 R11: 0000000000000000 R12: ffffc90003277988 R13: ffffffff817987d0 R14: ffffc90003277a48 R15: ffffc90003277f08 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 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3798 [inline] slab_alloc_node mm/slub.c:3845 [inline] kmem_cache_alloc_lru+0x142/0x6f0 mm/slub.c:3864 alloc_inode_sb include/linux/fs.h:3091 [inline] sock_alloc_inode+0x25/0x1c0 net/socket.c:308 alloc_inode+0x5d/0x230 fs/inode.c:261 new_inode_pseudo+0x16/0x80 fs/inode.c:1007 sock_alloc+0x40/0x280 net/socket.c:634 __sock_create+0xc0/0x800 net/socket.c:1535 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0x14f/0x260 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1718 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f001287fc27 Code: f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 b8 29 00 00 00 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:00007ffedc04b7f8 EFLAGS: 00000206 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f001287fc27 RDX: 0000000000000006 RSI: 0000000000000001 RDI: 0000000000000002 RBP: 00007ffedc04bf4c R08: 00007ffedc04b84c R09: 00007ffedc04bc37 R10: 00007ffedc04b8a0 R11: 0000000000000206 R12: 00007f001297cd00 R13: 000000000001813a R14: 000000000001795e R15: 00007f001297eec0 ---------------- Code disassembly (best guess): 0: 0f 8e 0f 0d 00 00 jle 0xd15 6: 8b 2b mov (%rbx),%ebp 8: 31 ff xor %edi,%edi a: 89 ee mov %ebp,%esi c: e8 fa a3 50 00 call 0x50a40b 11: 85 ed test %ebp,%ebp 13: 75 1c jne 0x31 15: 31 db xor %ebx,%ebx 17: e8 0f a9 50 00 call 0x50a92b 1c: 89 d8 mov %ebx,%eax 1e: 48 83 c4 40 add $0x40,%rsp 22: 5b pop %rbx 23: 5d pop %rbp 24: 41 5c pop %r12 26: 41 5d pop %r13 28: 41 5e pop %r14 * 2a: 41 5f pop %r15 <-- trapping instruction 2c: c3 ret 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: e8 f5 a8 50 00 call 0x50a92b 36: 48 8d 43 48 lea 0x48(%rbx),%rax 3a: 48 89 c2 mov %rax,%rdx 3d: 48 rex.W 3e: 89 .byte 0x89 3f: 04 .byte 0x4