============================================ WARNING: possible recursive locking detected 6.10.0-rc7-syzkaller-01793-g69cf87304dcb #0 Not tainted -------------------------------------------- modprobe/5255 is trying to acquire lock: ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 but task is already holding lock: ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by modprobe/5255: #0: ffff88801faf2148 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:683 [inline] #0: ffff88801faf2148 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x2f9/0x6e0 mm/memory.c:5845 #1: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #1: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: vmf_anon_prepare mm/memory.c:3234 [inline] #1: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: do_anonymous_page mm/memory.c:4451 [inline] #1: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: do_pte_missing mm/memory.c:3895 [inline] #1: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: handle_pte_fault+0x57ad/0x7090 mm/memory.c:5381 #2: ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] #2: ffff8880b94387b8 (lock#10){+.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 #3: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: get_memcg_path_buf mm/mmap_lock.c:139 [inline] #3: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: get_mm_memcg_path+0xb1/0x600 mm/mmap_lock.c:209 #4: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: trace_call_bpf+0xbc/0x8a0 #5: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #5: ffff8880419d5718 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 5255 Comm: modprobe Not tainted 6.10.0-rc7-syzkaller-01793-g69cf87304dcb #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain+0x15d3/0x5900 kernel/locking/lockdep.c:3856 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] bpf_mmap_unlock_mm kernel/bpf/mmap_unlock_work.h:52 [inline] stack_map_get_build_id_offset+0x9c7/0x9d0 kernel/bpf/stackmap.c:173 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 bpf_prog_e6cf5f9c69743609+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] bpf_prog_run_array include/linux/bpf.h:2104 [inline] trace_call_bpf+0x369/0x8a0 kernel/trace/bpf_trace.c:147 perf_trace_run_bpf_submit+0x7c/0x1d0 kernel/events/core.c:10282 perf_trace_mmap_lock+0x3d7/0x510 include/trace/events/mmap_lock.h:16 trace_mmap_lock_released include/trace/events/mmap_lock.h:50 [inline] __mmap_lock_do_trace_released+0x5bb/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] vmf_anon_prepare mm/memory.c:3242 [inline] do_anonymous_page mm/memory.c:4451 [inline] do_pte_missing mm/memory.c:3895 [inline] handle_pte_fault+0x6fa4/0x7090 mm/memory.c:5381 __handle_mm_fault mm/memory.c:5524 [inline] handle_mm_fault+0x10df/0x1ba0 mm/memory.c:5689 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f3e0dc08124 Code: 53 48 83 ec 20 64 48 8b 04 25 28 00 00 00 48 89 44 24 18 31 c0 e8 dc fa ff ff 48 8d 15 81 d0 01 00 48 c7 44 24 08 00 00 00 00 <89> 02 48 8b 05 3b be 01 00 48 83 38 00 0f 85 eb 00 00 00 48 8d 3d RSP: 002b:00007fffdc924080 EFLAGS: 00010202 RAX: 0000000000001000 RBX: 00007f3e0dc234f8 RCX: 0000000000000002 RDX: 00007f3e0dc2519c RSI: 00007fffdc924158 RDI: 000000000000001e RBP: 00007f3e0dc234f0 R08: 0000000000000000 R09: 000000000000000d R10: 00007fffdc923d90 R11: 0000000000000246 R12: 0000000000000004 R13: 00007fffdc924158 R14: 00007fffdc924180 R15: 0000000000000000