============================================ WARNING: possible recursive locking detected 6.12.0-rc7-syzkaller-00216-gf66d6acccbc0 #0 Not tainted -------------------------------------------- kworker/u32:13/7233 is trying to acquire lock: ffffc90003ae10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 but task is already holding lock: ffffc900068420d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rb->spinlock); lock(&rb->spinlock); *** DEADLOCK *** May be due to missing lock nesting notation 10 locks held by kworker/u32:13/7233: #0: ffff8881064d5948 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x129b/0x1ba0 kernel/workqueue.c:3204 #1: ffffc90004727d80 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work+0x921/0x1ba0 kernel/workqueue.c:3205 #2: ffffffff8fee3968 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_dad_work+0xcf/0x14d0 net/ipv6/addrconf.c:4196 #3: ffff888047e43538 (&idev->mc_lock){+.+.}-{3:3}, at: ipv6_mc_dad_complete+0x23/0x2b0 net/ipv6/mcast.c:2242 #4: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #4: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #4: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: mld_sendpack+0x1bf/0x11d0 net/ipv6/mcast.c:1791 #5: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #5: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #5: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x3da/0x1a50 net/ipv6/ip6_output.c:126 #6: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: local_lock_release include/linux/local_lock_internal.h:38 [inline] #6: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: process_backlog+0x3f1/0x15f0 net/core/dev.c:6113 #7: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #7: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #7: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline] #7: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357 #8: ffffc900068420d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 #9: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #9: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #9: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline] #9: ffffffff8e1b83c0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2357 stack backtrace: CPU: 0 UID: 0 PID: 7233 Comm: kworker/u32:13 Not tainted 6.12.0-rc7-syzkaller-00216-gf66d6acccbc0 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: ipv6_addrconf addrconf_dad_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain kernel/locking/lockdep.c:3891 [inline] __lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x57/0x90 kernel/bpf/ringbuf.c:470 bpf_prog_0e153dac479590bf+0x35/0x70 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [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:2316 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357 __bpf_trace_contention_begin+0xca/0x110 include/trace/events/lock.h:95 __preempt_count_dec_and_test arch/x86/include/asm/preempt.h:94 [inline] trace_contention_begin.constprop.0+0xed/0x170 include/trace/events/lock.h:95 __pv_queued_spin_lock_slowpath+0x10b/0xc90 kernel/locking/qspinlock.c:402 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x210/0x2c0 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x36e/0x4b0 kernel/bpf/ringbuf.c:427 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:478 [inline] bpf_ringbuf_reserve+0x57/0x90 kernel/bpf/ringbuf.c:470 bpf_prog_9efe54833449f08e+0x2e/0x48 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [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:2316 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2357 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x258/0x4b0 mm/slub.c:4714 skb_kfree_head net/core/skbuff.c:1086 [inline] skb_free_head+0x108/0x1d0 net/core/skbuff.c:1098 skb_release_data+0x560/0x730 net/core/skbuff.c:1125 skb_release_all net/core/skbuff.c:1190 [inline] __kfree_skb net/core/skbuff.c:1204 [inline] sk_skb_reason_drop+0x129/0x1a0 net/core/skbuff.c:1242 kfree_skb_reason include/linux/skbuff.h:1262 [inline] kfree_skb include/linux/skbuff.h:1271 [inline] ip6_mc_input+0x7af/0xfd0 net/ipv6/ip6_input.c:587 dst_input include/net/dst.h:460 [inline] dst_input include/net/dst.h:458 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ipv6_rcv+0x45a/0x680 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670 __netif_receive_skb+0x1d/0x160 net/core/dev.c:5783 process_backlog+0x443/0x15f0 net/core/dev.c:6115 __napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:6779 napi_poll net/core/dev.c:6848 [inline] net_rx_action+0xa92/0x1010 net/core/dev.c:6970 handle_softirqs+0x213/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x887/0x4350 net/core/dev.c:4459 dev_queue_xmit include/linux/netdevice.h:3094 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip6_finish_output2+0x11e9/0x1a50 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x3f9/0x1300 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x1f8/0x540 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:450 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] mld_sendpack+0x9f0/0x11d0 net/ipv6/mcast.c:1819 mld_send_initial_cr.part.0+0x1a1/0x260 net/ipv6/mcast.c:2237 mld_send_initial_cr include/linux/refcount.h:192 [inline] ipv6_mc_dad_complete+0x22c/0x2b0 net/ipv6/mcast.c:2245 addrconf_dad_completed+0xd40/0x1060 net/ipv6/addrconf.c:4342 addrconf_dad_work+0x7fb/0x14d0 net/ipv6/addrconf.c:4270 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244