====================================================== WARNING: possible circular locking dependency detected 5.15.160-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.1/4956 is trying to acquire lock: ffff8880b9b35bb8 (lock#9){+.+.}-{2:2}, at: local_lock_acquire+0xd/0x170 include/linux/local_lock_internal.h:28 but task is already holding lock: ffff8880b9b3a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:368 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline] rq_lock kernel/sched/sched.h:1621 [inline] task_fork_fair+0x5d/0x350 kernel/sched/fair.c:11480 sched_cgroup_fork+0x2d3/0x330 kernel/sched/core.c:4466 copy_process+0x224a/0x3ef0 kernel/fork.c:2320 kernel_clone+0x210/0x960 kernel/fork.c:2604 kernel_thread+0x168/0x1e0 kernel/fork.c:2656 rest_init+0x21/0x330 init/main.c:706 start_kernel+0x48c/0x540 init/main.c:1140 secondary_startup_64_no_verify+0xb1/0xbb -> #2 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 try_to_wake_up+0xae/0x1300 kernel/sched/core.c:4030 signal_wake_up_state kernel/signal.c:770 [inline] signal_wake_up include/linux/sched/signal.h:421 [inline] complete_signal+0x5a0/0x9a0 kernel/signal.c:1062 __send_signal+0xaaf/0xd40 kernel/signal.c:1182 do_notify_parent+0xc1e/0xf00 kernel/signal.c:2113 exit_notify kernel/exit.c:729 [inline] do_exit+0x1464/0x2480 kernel/exit.c:892 do_group_exit+0x144/0x310 kernel/exit.c:994 __do_sys_exit_group kernel/exit.c:1005 [inline] __se_sys_exit_group kernel/exit.c:1003 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1003 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (&sighand->siglock){..-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 __lock_task_sighand+0x11a/0x290 kernel/signal.c:1404 lock_task_sighand include/linux/sched/signal.h:704 [inline] do_send_sig_info kernel/signal.c:1293 [inline] group_send_sig_info+0x23f/0x2d0 kernel/signal.c:1442 bpf_send_signal_common+0x2d8/0x420 kernel/trace/bpf_trace.c:824 ____bpf_send_signal kernel/trace/bpf_trace.c:829 [inline] bpf_send_signal+0x15/0x20 kernel/trace/bpf_trace.c:827 0xffffffffa0026a86 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run4+0x1ea/0x390 kernel/trace/bpf_trace.c:1919 trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:44 [inline] __mmap_lock_do_trace_acquire_returned+0x2d6/0x340 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] do_user_addr_fault arch/x86/mm/fault.c:1329 [inline] handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x59c/0x740 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568 -> #0 (lock#9){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] stack_map_get_build_id_offset+0x612/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_ec3b2eefa702d8d3+0x3a/0xf9c bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 trace_tlb_flush+0xed/0x110 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x748/0xa30 context_switch kernel/sched/core.c:5016 [inline] __schedule+0x1167/0x45b0 kernel/sched/core.c:6376 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780 irqentry_exit+0x53/0x80 kernel/entry/common.c:432 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638 touch_buffer+0x0/0x200 __find_get_block+0x2d7/0x1350 fs/buffer.c:1314 __getblk_gfp+0x2d/0xaf0 fs/buffer.c:1332 sb_getblk include/linux/buffer_head.h:361 [inline] __ext4_get_inode_loc+0x4ce/0xcd0 fs/ext4/inode.c:4314 ext4_get_inode_loc fs/ext4/inode.c:4438 [inline] ext4_reserve_inode_write+0x1bf/0x3d0 fs/ext4/inode.c:5779 __ext4_mark_inode_dirty+0x1d6/0x860 fs/ext4/inode.c:5956 __ext4_new_inode+0x3759/0x4430 fs/ext4/ialloc.c:1347 ext4_create+0x275/0x550 fs/ext4/namei.c:2834 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0x130a/0x2f20 fs/namei.c:3739 do_filp_open+0x21c/0x460 fs/namei.c:3769 do_sys_openat2+0x13b/0x500 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: lock#9 --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(lock#9); *** DEADLOCK *** 6 locks held by syz-executor.1/4956: #0: ffff88814b0b8460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377 #1: ffff888060faabd0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline] #1: ffff888060faabd0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: open_last_lookups fs/namei.c:3529 [inline] #1: ffff888060faabd0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: path_openat+0x824/0x2f20 fs/namei.c:3739 #2: ffff88814b0bc990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x12b9/0x1570 fs/jbd2/transaction.c:462 #3: ffff8880b9b3a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 #4: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #5: ffff888019ecf128 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #5: ffff888019ecf128 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x23e/0x930 kernel/bpf/stackmap.c:185 stack backtrace: CPU: 1 PID: 4956 Comm: syz-executor.1 Not tainted 5.15.160-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 local_lock_acquire+0x29/0x170 include/linux/local_lock_internal.h:29 __mmap_lock_do_trace_acquire_returned+0x7c/0x340 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] stack_map_get_build_id_offset+0x612/0x930 kernel/bpf/stackmap.c:185 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:496 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1490 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1480 bpf_prog_ec3b2eefa702d8d3+0x3a/0xf9c bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 trace_tlb_flush+0xed/0x110 include/trace/events/tlb.h:38 switch_mm_irqs_off+0x748/0xa30 context_switch kernel/sched/core.c:5016 [inline] __schedule+0x1167/0x45b0 kernel/sched/core.c:6376 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780 irqentry_exit+0x53/0x80 kernel/entry/common.c:432 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:touch_buffer+0x0/0x200 fs/buffer.c:61 Code: e8 45 06 9b ff e9 71 fe ff ff 89 d9 80 e1 07 80 c1 03 38 c1 7c a3 48 89 df e8 2c d4 e4 ff eb 99 cc cc cc cc cc cc cc cc cc cc <55> 41 57 41 56 41 54 53 49 89 fc 49 be 00 00 00 00 00 fc ff df e8 RSP: 0018:ffffc90002f37018 EFLAGS: 00000283 RAX: ffffffff81e57e4f RBX: 0000000000001000 RCX: 0000000000040000 RDX: ffffc9000d275000 RSI: 0000000000000bf7 RDI: ffff888071d60e80 RBP: ffffc90002f37180 R08: dffffc0000000000 R09: fffffbfff1f7f02d R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888071d60e80 R13: 0000000000000000 R14: 0000000000001000 R15: 0000000000036578 __find_get_block+0x2d7/0x1350 fs/buffer.c:1314 __getblk_gfp+0x2d/0xaf0 fs/buffer.c:1332 sb_getblk include/linux/buffer_head.h:361 [inline] __ext4_get_inode_loc+0x4ce/0xcd0 fs/ext4/inode.c:4314 ext4_get_inode_loc fs/ext4/inode.c:4438 [inline] ext4_reserve_inode_write+0x1bf/0x3d0 fs/ext4/inode.c:5779 __ext4_mark_inode_dirty+0x1d6/0x860 fs/ext4/inode.c:5956 __ext4_new_inode+0x3759/0x4430 fs/ext4/ialloc.c:1347 ext4_create+0x275/0x550 fs/ext4/namei.c:2834 lookup_open fs/namei.c:3462 [inline] open_last_lookups fs/namei.c:3532 [inline] path_openat+0x130a/0x2f20 fs/namei.c:3739 do_filp_open+0x21c/0x460 fs/namei.c:3769 do_sys_openat2+0x13b/0x500 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1280 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5ad1735f69 Code: Unable to access opcode bytes at RIP 0x7f5ad1735f3f. RSP: 002b:00007f5ad02af0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f5ad186cf80 RCX: 00007f5ad1735f69 RDX: 000000000000275a RSI: 0000000020000080 RDI: ffffffffffffff9c RBP: 00007f5ad17936fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5ad186cf80 R15: 00007fff383d81e8 ---------------- Code disassembly (best guess): 0: e8 45 06 9b ff call 0xff9b064a 5: e9 71 fe ff ff jmp 0xfffffe7b a: 89 d9 mov %ebx,%ecx c: 80 e1 07 and $0x7,%cl f: 80 c1 03 add $0x3,%cl 12: 38 c1 cmp %al,%cl 14: 7c a3 jl 0xffffffb9 16: 48 89 df mov %rbx,%rdi 19: e8 2c d4 e4 ff call 0xffe4d44a 1e: eb 99 jmp 0xffffffb9 20: cc int3 21: cc int3 22: cc int3 23: cc int3 24: cc int3 25: cc int3 26: cc int3 27: cc int3 28: cc int3 29: cc int3 * 2a: 55 push %rbp <-- trapping instruction 2b: 41 57 push %r15 2d: 41 56 push %r14 2f: 41 54 push %r12 31: 53 push %rbx 32: 49 89 fc mov %rdi,%r12 35: 49 be 00 00 00 00 00 movabs $0xdffffc0000000000,%r14 3c: fc ff df 3f: e8 .byte 0xe8