FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 ====================================================== WARNING: possible circular locking dependency detected 6.6.102-syzkaller #0 Not tainted ------------------------------------------------------ syz.3.296/6746 is trying to acquire lock: ffffffff8cd23e20 (console_owner){-...}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:1995 [inline] ffffffff8cd23e20 (console_owner){-...}-{0:0}, at: vprintk_emit+0x301/0x600 kernel/printk/printk.c:2340 but task is already holding lock: ffff8880b8e3c458 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:558 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&rq->__lock){-.-.}-{2:2}: _raw_spin_lock_nested+0x32/0x50 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:558 raw_spin_rq_lock kernel/sched/sched.h:1372 [inline] rq_lock kernel/sched/sched.h:1681 [inline] task_fork_fair+0x62/0x1f0 kernel/sched/fair.c:12662 sched_cgroup_fork+0x333/0x3c0 kernel/sched/core.c:4816 copy_process+0x21e4/0x3d70 kernel/fork.c:2614 kernel_clone+0x21b/0x840 kernel/fork.c:2914 user_mode_thread+0xde/0x130 kernel/fork.c:2992 rest_init+0x27/0x300 init/main.c:697 arch_call_rest_init+0xe/0x10 init/main.c:829 start_kernel+0x459/0x4e0 init/main.c:1074 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555 copy_bootdata+0x0/0xe0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x179/0x17b -> #3 (&p->pi_lock){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:522 [inline] try_to_wake_up+0x60/0x1140 kernel/sched/core.c:4232 __wake_up_common+0x2a4/0x4e0 kernel/sched/wait.c:107 __wake_up_common_lock kernel/sched/wait.c:138 [inline] __wake_up+0x112/0x190 kernel/sched/wait.c:160 tty_port_default_wakeup+0xa2/0xf0 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x6bd/0x8a0 drivers/tty/serial/8250/8250_port.c:1837 serial8250_handle_irq+0x534/0x6e0 drivers/tty/serial/8250/8250_port.c:1944 serial8250_default_handle_irq+0xb8/0x1a0 drivers/tty/serial/8250/8250_port.c:1964 serial8250_interrupt+0x9f/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x276/0x930 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x247/0xb30 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline] handle_irq arch/x86/kernel/irq.c:240 [inline] __common_interrupt+0x13b/0x230 arch/x86/kernel/irq.c:259 common_interrupt+0xb4/0xd0 arch/x86/kernel/irq.c:249 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:678 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:147 arch_safe_halt arch/x86/include/asm/paravirt.h:108 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:753 default_idle_call+0x6c/0xa0 kernel/sched/idle.c:97 cpuidle_idle_call kernel/sched/idle.c:170 [inline] do_idle+0x1eb/0x510 kernel/sched/idle.c:282 cpu_startup_entry+0x43/0x60 kernel/sched/idle.c:380 start_secondary+0xee/0xf0 arch/x86/kernel/smpboot.c:323 secondary_startup_64_no_verify+0x179/0x17b -> #2 (&tty->write_wait){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xf8/0x190 kernel/sched/wait.c:160 tty_port_default_wakeup+0xa2/0xf0 drivers/tty/tty_port.c:69 serial8250_tx_chars+0x6bd/0x8a0 drivers/tty/serial/8250/8250_port.c:1837 serial8250_handle_irq+0x534/0x6e0 drivers/tty/serial/8250/8250_port.c:1944 serial8250_default_handle_irq+0xb8/0x1a0 drivers/tty/serial/8250/8250_port.c:1964 serial8250_interrupt+0x9f/0x1c0 drivers/tty/serial/8250/8250_core.c:127 __handle_irq_event_percpu+0x276/0x930 kernel/irq/handle.c:158 handle_irq_event_percpu kernel/irq/handle.c:193 [inline] handle_irq_event+0x8b/0x1e0 kernel/irq/handle.c:210 handle_edge_irq+0x247/0xb30 kernel/irq/chip.c:831 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline] handle_irq arch/x86/kernel/irq.c:240 [inline] __common_interrupt+0x13b/0x230 arch/x86/kernel/irq.c:259 common_interrupt+0xb4/0xd0 arch/x86/kernel/irq.c:249 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:678 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:147 arch_safe_halt arch/x86/include/asm/paravirt.h:108 [inline] default_idle+0x13/0x20 arch/x86/kernel/process.c:753 default_idle_call+0x6c/0xa0 kernel/sched/idle.c:97 cpuidle_idle_call kernel/sched/idle.c:170 [inline] do_idle+0x1eb/0x510 kernel/sched/idle.c:282 cpu_startup_entry+0x43/0x60 kernel/sched/idle.c:380 start_secondary+0xee/0xf0 arch/x86/kernel/smpboot.c:323 secondary_startup_64_no_verify+0x179/0x17b -> #1 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162 serial8250_console_write+0x16d/0x17a0 drivers/tty/serial/8250/8250_port.c:3434 console_emit_next_record kernel/printk/printk.c:2944 [inline] console_flush_all+0x6cd/0xd00 kernel/printk/printk.c:3000 console_unlock+0xae/0x340 kernel/printk/printk.c:3069 vprintk_emit+0x477/0x600 kernel/printk/printk.c:2341 _printk+0xd0/0x110 kernel/printk/printk.c:2366 register_console+0x91b/0xe60 kernel/printk/printk.c:3583 univ8250_console_init+0x45/0x50 drivers/tty/serial/8250/8250_core.c:717 console_init+0x17b/0x5e0 kernel/printk/printk.c:3726 start_kernel+0x2c0/0x4e0 init/main.c:1010 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555 copy_bootdata+0x0/0xe0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x179/0x17b -> #0 (console_owner){-...}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 console_trylock_spinning kernel/printk/printk.c:1995 [inline] vprintk_emit+0x31e/0x600 kernel/printk/printk.c:2340 _printk+0xd0/0x110 kernel/printk/printk.c:2366 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x37e/0x4d0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:212 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:221 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:218 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1213 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run4+0x1f9/0x420 kernel/trace/bpf_trace.c:2363 __bpf_trace_sched_switch+0x17b/0x1e0 include/trace/events/sched.h:222 __traceiter_sched_switch+0x93/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x2197/0x44d0 kernel/sched/core.c:6696 preempt_schedule_common+0x82/0xc0 kernel/sched/core.c:6866 preempt_schedule+0xab/0xc0 kernel/sched/core.c:6890 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xfa/0x110 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] prepare_to_wait_event+0x434/0x470 kernel/sched/wait.c:340 synchronize_rcu_expedited+0x667/0x830 kernel/rcu/tree_exp.h:1019 synchronize_rcu+0x136/0x380 kernel/rcu/tree.c:3627 bpf_dispatcher_update kernel/bpf/dispatcher.c:131 [inline] bpf_dispatcher_change_prog+0xb55/0xcc0 kernel/bpf/dispatcher.c:170 bpf_prog_test_run_xdp+0x6c2/0xfa0 net/bpf/test_run.c:1256 bpf_prog_test_run+0x321/0x390 kernel/bpf/syscall.c:4123 __sys_bpf+0x440/0x800 kernel/bpf/syscall.c:5485 __do_sys_bpf kernel/bpf/syscall.c:5571 [inline] __se_sys_bpf kernel/bpf/syscall.c:5569 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5569 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 other info that might help us debug this: Chain exists of: console_owner --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock(console_owner); *** DEADLOCK *** 4 locks held by syz.3.296/6746: #0: ffffffff8dfbe7c8 (bpf_dispatcher_xdp.mutex){+.+.}-{3:3}, at: bpf_dispatcher_change_prog+0xa1/0xcc0 kernel/bpf/dispatcher.c:146 #1: ffffffff8cd35bb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:292 [inline] #1: ffffffff8cd35bb8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x448/0x830 kernel/rcu/tree_exp.h:1004 #2: ffff8880b8e3c458 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:558 #3: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline] #3: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline] #3: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline] #3: ffffffff8cd2fbe0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0xfd/0x420 kernel/trace/bpf_trace.c:2363 stack backtrace: CPU: 0 PID: 6746 Comm: syz.3.296 Not tainted 6.6.102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 check_noncircular+0x2bd/0x3c0 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 kernel/locking/lockdep.c:3869 [inline] __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754 console_trylock_spinning kernel/printk/printk.c:1995 [inline] vprintk_emit+0x31e/0x600 kernel/printk/printk.c:2340 _printk+0xd0/0x110 kernel/printk/printk.c:2366 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x37e/0x4d0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:212 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:221 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:218 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1213 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run4+0x1f9/0x420 kernel/trace/bpf_trace.c:2363 __bpf_trace_sched_switch+0x17b/0x1e0 include/trace/events/sched.h:222 __traceiter_sched_switch+0x93/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x2197/0x44d0 kernel/sched/core.c:6696 preempt_schedule_common+0x82/0xc0 kernel/sched/core.c:6866 preempt_schedule+0xab/0xc0 kernel/sched/core.c:6890 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xfa/0x110 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] prepare_to_wait_event+0x434/0x470 kernel/sched/wait.c:340 synchronize_rcu_expedited+0x667/0x830 kernel/rcu/tree_exp.h:1019 synchronize_rcu+0x136/0x380 kernel/rcu/tree.c:3627 bpf_dispatcher_update kernel/bpf/dispatcher.c:131 [inline] bpf_dispatcher_change_prog+0xb55/0xcc0 kernel/bpf/dispatcher.c:170 bpf_prog_test_run_xdp+0x6c2/0xfa0 net/bpf/test_run.c:1256 bpf_prog_test_run+0x321/0x390 kernel/bpf/syscall.c:4123 __sys_bpf+0x440/0x800 kernel/bpf/syscall.c:5485 __do_sys_bpf kernel/bpf/syscall.c:5571 [inline] __se_sys_bpf kernel/bpf/syscall.c:5569 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5569 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f540118ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f53ff3f6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f54013b5fa0 RCX: 00007f540118ebe9 RDX: 0000000000000048 RSI: 0000200000000600 RDI: 000000000000000a RBP: 00007f53ff3f6090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007f54013b6038 R14: 00007f54013b5fa0 R15: 00007ffee51f8968 CPU: 0 PID: 6746 Comm: syz.3.296 Not tainted 6.6.102-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106 fail_dump lib/fault-inject.c:52 [inline] should_fail_ex+0x39d/0x4d0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:212 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:221 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:218 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1213 [inline] __bpf_prog_run include/linux/filter.h:612 [inline] bpf_prog_run include/linux/filter.h:619 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline] bpf_trace_run4+0x1f9/0x420 kernel/trace/bpf_trace.c:2363 __bpf_trace_sched_switch+0x17b/0x1e0 include/trace/events/sched.h:222 __traceiter_sched_switch+0x93/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x2197/0x44d0 kernel/sched/core.c:6696 preempt_schedule_common+0x82/0xc0 kernel/sched/core.c:6866 preempt_schedule+0xab/0xc0 kernel/sched/core.c:6890 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] _raw_spin_unlock_irqrestore+0xfa/0x110 kernel/locking/spinlock.c:194 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] prepare_to_wait_event+0x434/0x470 kernel/sched/wait.c:340 synchronize_rcu_expedited+0x667/0x830 kernel/rcu/tree_exp.h:1019 synchronize_rcu+0x136/0x380 kernel/rcu/tree.c:3627 bpf_dispatcher_update kernel/bpf/dispatcher.c:131 [inline] bpf_dispatcher_change_prog+0xb55/0xcc0 kernel/bpf/dispatcher.c:170 bpf_prog_test_run_xdp+0x6c2/0xfa0 net/bpf/test_run.c:1256 bpf_prog_test_run+0x321/0x390 kernel/bpf/syscall.c:4123 __sys_bpf+0x440/0x800 kernel/bpf/syscall.c:5485 __do_sys_bpf kernel/bpf/syscall.c:5571 [inline] __se_sys_bpf kernel/bpf/syscall.c:5569 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5569 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f540118ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f53ff3f6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f54013b5fa0 RCX: 00007f540118ebe9 RDX: 0000000000000048 RSI: 0000200000000600 RDI: 000000000000000a RBP: 00007f53ff3f6090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007f54013b6038 R14: 00007f54013b5fa0 R15: 00007ffee51f8968