====================================================== WARNING: possible circular locking dependency detected 6.12.0-rc4-syzkaller-00001-ga552e2ef5fd1 #0 Not tainted ------------------------------------------------------ syz.1.2175/12079 is trying to acquire lock: ffff8880b8729430 (krc.lock){..-.}-{2:2}, at: krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] ffff8880b8729430 (krc.lock){..-.}-{2:2}, at: add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] ffff8880b8729430 (krc.lock){..-.}-{2:2}, at: kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 but task is already holding lock: ffff8880b872a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&base->lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 lock_timer_base+0x112/0x240 kernel/time/timer.c:1051 __mod_timer+0x1ca/0xeb0 kernel/time/timer.c:1132 queue_delayed_work_on+0x1ca/0x390 kernel/workqueue.c:2552 kvfree_call_rcu+0x47f/0x790 kernel/rcu/tree.c:3839 pwq_release_workfn+0x664/0x800 kernel/workqueue.c:5078 kthread_worker_fn+0x500/0xb70 kernel/kthread.c:844 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 (krc.lock){..-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540 bpf_prog_2e5e7763945ac34e+0x45/0x49 bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2359 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663 internal_add_timer kernel/time/timer.c:688 [inline] __mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1794 expire_timers kernel/time/timer.c:1845 [inline] __run_timers kernel/time/timer.c:2419 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430 run_timer_base kernel/time/timer.c:2439 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] __put_partials+0xad/0x130 mm/slub.c:3138 put_cpu_partial+0x17c/0x250 mm/slub.c:3220 __slab_free+0x2ea/0x3d0 mm/slub.c:4449 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_lru_noprof+0x139/0x2b0 mm/slub.c:4153 sock_alloc_inode+0x28/0xc0 net/socket.c:307 alloc_inode+0x65/0x1a0 fs/inode.c:265 sock_alloc net/socket.c:633 [inline] __sock_create+0x123/0x940 net/socket.c:1540 sock_create net/socket.c:1632 [inline] __sys_socketpair+0x2ca/0x720 net/socket.c:1779 __do_sys_socketpair net/socket.c:1832 [inline] __se_sys_socketpair net/socket.c:1829 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1829 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&base->lock); lock(krc.lock); lock(&base->lock); lock(krc.lock); *** DEADLOCK *** 4 locks held by syz.1.2175/12079: #0: ffffffff8ea4ff88 (remove_cache_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:151 [inline] #0: ffffffff8ea4ff88 (remove_cache_srcu){.+.+}-{0:0}, at: srcu_read_lock+0x24/0x50 include/linux/srcu.h:250 #1: ffffc90000a18c00 ((&app->join_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1791 #2: ffff8880b872a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051 #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2317 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2359 stack backtrace: CPU: 1 UID: 0 PID: 12079 Comm: syz.1.2175 Not tainted 6.12.0-rc4-syzkaller-00001-ga552e2ef5fd1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 krc_this_cpu_lock kernel/rcu/tree.c:3312 [inline] add_ptr_to_bulk_krc_lock kernel/rcu/tree.c:3725 [inline] kvfree_call_rcu+0x18a/0x790 kernel/rcu/tree.c:3811 trie_delete_elem+0x546/0x6a0 kernel/bpf/lpm_trie.c:540 bpf_prog_2e5e7763945ac34e+0x45/0x49 bpf_dispatcher_nop_func include/linux/bpf.h:1257 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2318 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2359 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663 internal_add_timer kernel/time/timer.c:688 [inline] __mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1794 expire_timers kernel/time/timer.c:1845 [inline] __run_timers kernel/time/timer.c:2419 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430 run_timer_base kernel/time/timer.c:2439 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 5e 87 2e f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 63 18 93 f5 65 8b 05 34 b2 33 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0018:ffffc900047e7a80 EFLAGS: 00000206 RAX: 1aa52efd638ad800 RBX: 1ffff920008fcf54 RCX: ffffffff8170ce0a RDX: dffffc0000000000 RSI: ffffffff8c0acb40 RDI: 0000000000000001 RBP: ffffc900047e7b08 R08: ffffffff942c9837 R09: 1ffffffff2859306 R10: dffffc0000000000 R11: fffffbfff2859307 R12: dffffc0000000000 R13: 1ffff920008fcf50 R14: ffffc900047e7aa0 R15: 0000000000000246 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] __put_partials+0xad/0x130 mm/slub.c:3138 put_cpu_partial+0x17c/0x250 mm/slub.c:3220 __slab_free+0x2ea/0x3d0 mm/slub.c:4449 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_lru_noprof+0x139/0x2b0 mm/slub.c:4153 sock_alloc_inode+0x28/0xc0 net/socket.c:307 alloc_inode+0x65/0x1a0 fs/inode.c:265 sock_alloc net/socket.c:633 [inline] __sock_create+0x123/0x940 net/socket.c:1540 sock_create net/socket.c:1632 [inline] __sys_socketpair+0x2ca/0x720 net/socket.c:1779 __do_sys_socketpair net/socket.c:1832 [inline] __se_sys_socketpair net/socket.c:1829 [inline] __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1829 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1c1977dff9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1c1a48f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000035 RAX: ffffffffffffffda RBX: 00007f1c19935f80 RCX: 00007f1c1977dff9 RDX: 0000000000000000 RSI: 0000000000000005 RDI: 000000000000001e RBP: 00007f1c197f0296 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020000940 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1c19935f80 R15: 00007ffd817b8c18 ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 5e 87 2e f6 call 0xf62e8772 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 63 18 93 f5 call 0xf5931892 <-- trapping instruction 2f: 65 8b 05 34 b2 33 74 mov %gs:0x7433b234(%rip),%eax # 0x7433b26a 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss