============================= [ BUG: Invalid wait context ] 6.12.0-rc5-next-20241101-syzkaller #0 Not tainted ----------------------------- kworker/u8:0/11 is trying to lock: ffff888061789a00 (&trie->lock){..-.}-{3:3}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462 other info that might help us debug this: context-{5:5} 4 locks held by kworker/u8:0/11: #0: ffff888031e9d948 ((wq_completion)bat_events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff888031e9d948 ((wq_completion)bat_events){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1850 kernel/workqueue.c:3310 #1: ffffc90000107d00 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90000107d00 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1850 kernel/workqueue.c:3310 #2: ffff8880b863e798 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 #3: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2339 [inline] #3: ffffffff8e939ee0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2381 stack backtrace: CPU: 0 UID: 0 PID: 11 Comm: kworker/u8:0 Not tainted 6.12.0-rc5-next-20241101-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: bat_events batadv_nc_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5176 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462 bpf_prog_c0188993c79ab9c8+0x46/0x4a bpf_dispatcher_nop_func include/linux/bpf.h:1290 [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:2340 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2381 __traceiter_tlb_flush+0x77/0xd0 include/trace/events/tlb.h:38 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x77a/0xa70 context_switch kernel/sched/core.c:5311 [inline] __schedule+0x10c7/0x4c30 kernel/sched/core.c:6707 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6886 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6910 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12 __local_bh_enable_ip+0x179/0x200 kernel/softirq.c:389 spin_unlock_bh include/linux/spinlock.h:396 [inline] batadv_nc_purge_paths+0x312/0x3b0 net/batman-adv/network-coding.c:471 batadv_nc_worker+0x365/0x610 net/batman-adv/network-coding.c:722 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310 worker_thread+0x870/0xd30 kernel/workqueue.c:3391 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