============================= [ BUG: Invalid wait context ] 6.13.0-syzkaller-07644-gc2da8b3f914f #0 Not tainted ----------------------------- syz.1.490/7679 is trying to lock: ffffffff8e425798 (kernfs_rename_lock){....}-{3:3}, at: kernfs_path_from_node+0x29/0x60 fs/kernfs/dir.c:229 other info that might help us debug this: context-{5:5} 7 locks held by syz.1.490/7679: #0: ffffffff8ff96570 (cb_lock){++++}-{4:4}, at: genl_rcv+0x19/0x40 net/netlink/genetlink.c:1218 #1: ffffffff8ff96628 (genl_mutex){+.+.}-{4:4}, at: genl_lock net/netlink/genetlink.c:35 [inline] #1: ffffffff8ff96628 (genl_mutex){+.+.}-{4:4}, at: genl_op_lock net/netlink/genetlink.c:60 [inline] #1: ffffffff8ff96628 (genl_mutex){+.+.}-{4:4}, at: genl_op_lock net/netlink/genetlink.c:57 [inline] #1: ffffffff8ff96628 (genl_mutex){+.+.}-{4:4}, at: genl_rcv_msg+0x580/0x800 net/netlink/genetlink.c:1209 #2: ffffffff8fef58e8 (rtnl_mutex){+.+.}-{4:4}, at: wg_set_device+0xce/0x13e0 drivers/net/wireguard/netlink.c:504 #3: ffff8881077ed4e8 (&wg->device_update_lock){+.+.}-{4:4}, at: wg_set_device+0xe4/0x13e0 drivers/net/wireguard/netlink.c:505 #4: ffff88806a93eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 #5: ffffffff8e1be140 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #5: ffffffff8e1be140 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #5: ffffffff8e1be140 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2370 [inline] #5: ffffffff8e1be140 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2412 #6: ffff88802935c7e0 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_trylock include/linux/mmap_lock.h:209 [inline] #6: ffff88802935c7e0 (&mm->mmap_lock){++++}-{4:4}, at: stack_map_get_build_id_offset+0x19a/0x6f0 kernel/bpf/stackmap.c:157 stack backtrace: CPU: 3 UID: 0 PID: 7679 Comm: syz.1.490 Not tainted 6.13.0-syzkaller-07644-gc2da8b3f914f #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4828 [inline] check_wait_context kernel/locking/lockdep.c:4900 [inline] __lock_acquire+0x878/0x3c40 kernel/locking/lockdep.c:5178 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0x74/0x90 kernel/locking/spinlock.c:236 kernfs_path_from_node+0x29/0x60 fs/kernfs/dir.c:229 kernfs_path include/linux/kernfs.h:598 [inline] cgroup_path include/linux/cgroup.h:599 [inline] get_mm_memcg_path.constprop.0+0xb7/0x3d0 mm/mmap_lock.c:59 __mmap_lock_do_trace_acquire_returned.part.0+0x95/0x2d0 mm/mmap_lock.c:79 __mmap_lock_do_trace_acquire_returned+0x33/0x40 include/trace/events/mmap_lock.h:48 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:210 [inline] stack_map_get_build_id_offset+0x535/0x6f0 kernel/bpf/stackmap.c:157 __bpf_get_stack+0x308/0xa20 kernel/bpf/stackmap.c:483 ____bpf_get_stack kernel/bpf/stackmap.c:499 [inline] bpf_get_stack+0x32/0x40 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1948 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1938 bpf_prog_ec3b2eefa702d8d3+0x43/0x47 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:2371 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2412 __bpf_trace_tlb_flush+0xd2/0x110 include/trace/events/tlb.h:38 __do_trace_tlb_flush include/trace/events/tlb.h:38 [inline] trace_tlb_flush+0xf7/0x180 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x395/0xb10 arch/x86/mm/tlb.c:638 context_switch kernel/sched/core.c:5361 [inline] __schedule+0xf59/0x5b60 kernel/sched/core.c:6764 preempt_schedule_common+0x44/0xc0 kernel/sched/core.c:6943 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0x61/0x80 kernel/locking/spinlock.c:194 __try_to_del_timer_sync+0x116/0x170 kernel/time/timer.c:1508 __timer_delete_sync+0xf4/0x1b0 kernel/time/timer.c:1662 wg_timers_stop+0x3d/0x60 drivers/net/wireguard/timers.c:240 peer_remove_after_dead+0x6c/0x340 drivers/net/wireguard/peer.c:106 wg_peer_remove+0x6f/0xe0 drivers/net/wireguard/peer.c:164 wg_set_device+0x11cd/0x13e0 drivers/net/wireguard/netlink.c:563 genl_family_rcv_msg_doit+0x202/0x2f0 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x565/0x800 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2543 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg net/socket.c:728 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2568 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2622 __sys_sendmsg+0x16e/0x220 net/socket.c:2654 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fdf1878cd29 Code: Unable to access opcode bytes at 0x7fdf1878ccff. RSP: 002b:00007fdf195ee038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdf189a5fa0 RCX: 00007fdf1878cd29 RDX: 0000000000000000 RSI: 0000000020000200 RDI: 0000000000000008 RBP: 00007fdf1880e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fdf189a5fa0 R15: 00007ffc4a64e858