FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
6.6.100-syzkaller #0 Not tainted
------------------------------------------------------
syz.3.2838/12227 is trying to acquire lock:
ffffffff8cd23e00 (console_owner){-...}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:339 [inline]
ffffffff8cd23e00 (console_owner){-...}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline]
ffffffff8cd23e00 (console_owner){-...}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:292 [inline]
ffffffff8cd23e00 (console_owner){-...}-{0:0}, at: console_flush_all+0x10f/0xd00 kernel/printk/printk.c:2992
but task is already holding lock:
ffff8880b8f3c458 (&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:4817
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+0x61/0x10b0 kernel/sched/core.c:4233
__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
rcu_is_watching+0x0/0xb0
trace_lock_acquire include/trace/events/lock.h:24 [inline]
lock_acquire+0xcb/0x410 kernel/locking/lockdep.c:5725
rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
rcu_read_lock include/linux/rcupdate.h:786 [inline]
path_init+0x160/0x1200 fs/namei.c:2362
path_openat+0x18e/0x3190 fs/namei.c:3784
do_filp_open+0x1c5/0x3d0 fs/namei.c:3816
do_sys_openat2+0x12c/0x1c0 fs/open.c:1419
do_sys_open fs/open.c:1434 [inline]
__do_sys_openat fs/open.c:1450 [inline]
__se_sys_openat fs/open.c:1445 [inline]
__x64_sys_openat+0x139/0x160 fs/open.c:1445
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
-> #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
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0xa9/0x110 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
uart_write+0x45b/0x5d0 drivers/tty/serial/serial_core.c:634
process_output_block drivers/tty/n_tty.c:580 [inline]
n_tty_write+0xd27/0x11d0 drivers/tty/n_tty.c:2395
iterate_tty_write drivers/tty/tty_io.c:1017 [inline]
file_tty_write+0x54b/0x980 drivers/tty/tty_io.c:1088
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x43b/0x940 fs/read_write.c:584
ksys_write+0x147/0x250 fs/read_write.c:637
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
-> #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_lock_spinning_enable kernel/printk/printk.c:1871 [inline]
console_emit_next_record kernel/printk/printk.c:2938 [inline]
console_flush_all+0x693/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
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:6697
schedule+0xbd/0x170 kernel/sched/core.c:6774
do_freezer_trap+0xe5/0x180 kernel/signal.c:2591
get_signal+0xedd/0x1400 kernel/signal.c:2758
arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
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.2838/12227:
#0: ffff8880b8f3c458 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:558
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline]
#1: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0xfd/0x420 kernel/trace/bpf_trace.c:2363
#2: ffffffff8cd23ee0 (console_lock){+.+.}-{0:0}, at: _printk+0xd0/0x110 kernel/printk/printk.c:2366
#3: ffffffff8cc0b6f0 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:339 [inline]
#3: ffffffff8cc0b6f0 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline]
#3: ffffffff8cc0b6f0 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:292 [inline]
#3: ffffffff8cc0b6f0 (console_srcu){....}-{0:0}, at: console_flush_all+0x10f/0xd00 kernel/printk/printk.c:2992
stack backtrace:
CPU: 1 PID: 12227 Comm: syz.3.2838 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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_lock_spinning_enable kernel/printk/printk.c:1871 [inline]
console_emit_next_record kernel/printk/printk.c:2938 [inline]
console_flush_all+0x693/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
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:6697
schedule+0xbd/0x170 kernel/sched/core.c:6774
do_freezer_trap+0xe5/0x180 kernel/signal.c:2591
get_signal+0xedd/0x1400 kernel/signal.c:2758
arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7faa1138e9a9
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:00007faa12175038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 0000000000000012 RBX: 00007faa115b5fa0 RCX: 00007faa1138e9a9
RDX: 0000000000000012 RSI: 0000200000000200 RDI: 000000000000000a
RBP: 00007faa12175090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007faa115b5fa0 R15: 00007ffcb99fd208
CPU: 1 PID: 12227 Comm: syz.3.2838 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/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:6697
schedule+0xbd/0x170 kernel/sched/core.c:6774
do_freezer_trap+0xe5/0x180 kernel/signal.c:2591
get_signal+0xedd/0x1400 kernel/signal.c:2758
arch_do_signal_or_restart+0x96/0x780 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7faa1138e9a9
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:00007faa12175038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: 0000000000000012 RBX: 00007faa115b5fa0 RCX: 00007faa1138e9a9
RDX: 0000000000000012 RSI: 0000200000000200 RDI: 000000000000000a
RBP: 00007faa12175090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007faa115b5fa0 R15: 00007ffcb99fd208