====================================================== WARNING: possible circular locking dependency detected 6.10.0-rc6-syzkaller-g19d3c179a377 #0 Not tainted ------------------------------------------------------ syz.1.830/7692 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_start_locking+0x83/0x620 mm/mmap_lock.c:230 but task is already holding lock: ffff8880b943e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 raw_spin_rq_lock kernel/sched/sched.h:1406 [inline] rq_lock kernel/sched/sched.h:1702 [inline] task_fork_fair+0x61/0x1e0 kernel/sched/fair.c:12710 sched_cgroup_fork+0x37c/0x410 kernel/sched/core.c:4844 copy_process+0x2217/0x3dc0 kernel/fork.c:2499 kernel_clone+0x226/0x8f0 kernel/fork.c:2797 user_mode_thread+0x132/0x1a0 kernel/fork.c:2875 rest_init+0x23/0x300 init/main.c:712 start_kernel+0x47a/0x500 init/main.c:1103 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x99/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline] try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4262 rcu_read_unlock_special+0x3db/0x550 kernel/rcu/tree_plugin.h:655 __rcu_read_unlock+0xa1/0x110 kernel/rcu/tree_plugin.h:426 rcu_read_unlock include/linux/rcupdate.h:814 [inline] get_mem_cgroup_from_mm+0x1b2/0x2a0 mm/memcontrol.c:1271 get_mm_memcg_path+0x1b/0x600 mm/mmap_lock.c:202 __mmap_lock_do_trace_released+0x134/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock+0x33/0x40 include/linux/mmap_lock.h:170 lock_mm_and_find_vma+0xf8/0x2f0 mm/memory.c:5788 do_user_addr_fault arch/x86/mm/fault.c:1361 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x1bf/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 strncpy_from_user+0x110/0x2f0 lib/strncpy_from_user.c:139 bpf_prog_load+0xd65/0x20f0 kernel/bpf/syscall.c:2849 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5710 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5815 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 -> #0 (lock#10){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869 __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_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+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_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5392 [inline] __schedule+0x1066/0x4a20 kernel/sched/core.c:6745 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:7067 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 unwind_next_frame+0xa9/0x2a00 arch/x86/kernel/unwind_orc.c:475 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4123 [inline] __kmalloc_node_noprof+0x22a/0x440 mm/slub.c:4130 kmalloc_node_noprof include/linux/slab.h:681 [inline] kvmalloc_node_noprof+0x72/0x190 mm/util.c:634 kvmalloc_array_node_noprof include/linux/slab.h:800 [inline] check_cfg+0x101/0x1920 kernel/bpf/verifier.c:16067 bpf_check+0x14514/0x19690 kernel/bpf/verifier.c:21747 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2908 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5710 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5815 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: Chain exists of: lock#10 --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(lock#10); *** DEADLOCK *** 2 locks held by syz.1.830/7692: #0: ffff8880b943e858 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2447 stack backtrace: CPU: 0 PID: 7692 Comm: syz.1.830 Not tainted 6.10.0-rc6-syzkaller-g19d3c179a377 #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_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869 __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_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] stack_map_get_build_id_offset+0x98a/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+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_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2447 trace_tlb_flush+0x118/0x140 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x7cb/0xae0 context_switch kernel/sched/core.c:5392 [inline] __schedule+0x1066/0x4a20 kernel/sched/core.c:6745 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:7067 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:unwind_done arch/x86/include/asm/unwind.h:50 [inline] RIP: 0010:unwind_next_frame+0xa9/0x2a00 arch/x86/kernel/unwind_orc.c:475 Code: e8 03 48 89 44 24 08 42 0f b6 04 28 84 c0 0f 85 6a 20 00 00 44 8b 75 00 31 ff 44 89 f6 e8 3f 3a 55 00 44 89 b4 24 8c 00 00 00 <45> 85 f6 0f 84 8a 00 00 00 48 89 5c 24 50 bf 01 00 00 00 e8 8f aa RSP: 0018:ffffc90004096a48 EFLAGS: 00000297 RAX: 0000000000000002 RBX: ffffc90004096b58 RCX: 0000000000040000 RDX: ffff888029bf5a00 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffffc90004096b20 R08: ffffffff8140f091 R09: ffffc90004096c10 R10: 0000000000000003 R11: ffffffff8181dcc0 R12: ffff888029bf5a00 R13: dffffc0000000000 R14: 0000000000000001 R15: ffffffff81a6ec97 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4123 [inline] __kmalloc_node_noprof+0x22a/0x440 mm/slub.c:4130 kmalloc_node_noprof include/linux/slab.h:681 [inline] kvmalloc_node_noprof+0x72/0x190 mm/util.c:634 kvmalloc_array_node_noprof include/linux/slab.h:800 [inline] check_cfg+0x101/0x1920 kernel/bpf/verifier.c:16067 bpf_check+0x14514/0x19690 kernel/bpf/verifier.c:21747 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2908 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5710 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5815 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:0x7f83e5975bd9 Code: Unable to access opcode bytes at 0x7f83e5975baf. RSP: 002b:00007f83e66c0048 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f83e5b03f60 RCX: 00007f83e5975bd9 RDX: 0000000000000090 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007f83e59e4e60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f83e5b03f60 R15: 00007ffee0f437f8 netlink: 188 bytes leftover after parsing attributes in process `syz.1.830'. ---------------- Code disassembly (best guess): 0: e8 03 48 89 44 call 0x44894808 5: 24 08 and $0x8,%al 7: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax c: 84 c0 test %al,%al e: 0f 85 6a 20 00 00 jne 0x207e 14: 44 8b 75 00 mov 0x0(%rbp),%r14d 18: 31 ff xor %edi,%edi 1a: 44 89 f6 mov %r14d,%esi 1d: e8 3f 3a 55 00 call 0x553a61 22: 44 89 b4 24 8c 00 00 mov %r14d,0x8c(%rsp) 29: 00 * 2a: 45 85 f6 test %r14d,%r14d <-- trapping instruction 2d: 0f 84 8a 00 00 00 je 0xbd 33: 48 89 5c 24 50 mov %rbx,0x50(%rsp) 38: bf 01 00 00 00 mov $0x1,%edi 3d: e8 .byte 0xe8 3e: 8f .byte 0x8f 3f: aa stos %al,%es:(%rdi)