FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
5.15.189-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.647/6043 is trying to acquire lock:
ffffffff8c110da0 (console_owner){-...}-{0:0}, at: console_lock_spinning_enable+0x2c/0x60 kernel/printk/printk.c:1802
but task is already holding lock:
ffff8880b903a318 (&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:
-> #4 (&rq->__lock){-.-.}-{2:2}:
_raw_spin_lock_nested+0x2e/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+0x5c/0x350 kernel/sched/fair.c:11499
sched_cgroup_fork+0x2c6/0x320 kernel/sched/core.c:4466
copy_process+0x22d1/0x3e00 kernel/fork.c:2395
kernel_clone+0x219/0x930 kernel/fork.c:2679
kernel_thread+0xc8/0x120 kernel/fork.c:2731
rest_init+0x21/0x330 init/main.c:706
start_kernel+0x486/0x530 init/main.c:1140
secondary_startup_64_no_verify+0xb1/0xbb
-> #3 (&p->pi_lock){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
try_to_wake_up+0x5c/0x1050 kernel/sched/core.c:4030
__wake_up_common+0x2a4/0x4e0 kernel/sched/wait.c:108
__wake_up_common_lock kernel/sched/wait.c:138 [inline]
__wake_up+0x108/0x180 kernel/sched/wait.c:157
tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51
serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828
serial8250_handle_irq+0x519/0x610 drivers/tty/serial/8250/8250_port.c:1924
serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941
serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127
__handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156
handle_irq_event_percpu kernel/irq/handle.c:196 [inline]
handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213
handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819
generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
handle_irq arch/x86/kernel/irq.c:233 [inline]
__common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252
common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242
asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667
__sanitizer_cov_trace_const_cmp8+0x4/0x80 kernel/kcov.c:301
__pte_needs_invert arch/x86/include/asm/pgtable-invert.h:18 [inline]
protnone_mask arch/x86/include/asm/pgtable-invert.h:24 [inline]
pte_pfn arch/x86/include/asm/pgtable.h:186 [inline]
wp_page_copy+0x18b/0x1fd0 mm/memory.c:3050
handle_pte_fault mm/memory.c:4668 [inline]
__handle_mm_fault mm/memory.c:4785 [inline]
handle_mm_fault+0x1eca/0x43c0 mm/memory.c:4883
do_user_addr_fault+0x489/0xc80 arch/x86/mm/fault.c:1357
handle_page_fault arch/x86/mm/fault.c:1445 [inline]
exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1501
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606
-> #2 (&tty->write_wait){-...}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xed/0x180 kernel/sched/wait.c:157
tty_port_default_wakeup+0xa5/0xf0 drivers/tty/tty_port.c:51
serial8250_tx_chars+0x629/0x830 drivers/tty/serial/8250/8250_port.c:1828
serial8250_handle_irq+0x519/0x610 drivers/tty/serial/8250/8250_port.c:1924
serial8250_default_handle_irq+0xb4/0x1a0 drivers/tty/serial/8250/8250_port.c:1941
serial8250_interrupt+0x9b/0x1c0 drivers/tty/serial/8250/8250_core.c:127
__handle_irq_event_percpu+0x291/0x9b0 kernel/irq/handle.c:156
handle_irq_event_percpu kernel/irq/handle.c:196 [inline]
handle_irq_event+0xa5/0x220 kernel/irq/handle.c:213
handle_edge_irq+0x243/0xb20 kernel/irq/chip.c:819
generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
handle_irq arch/x86/kernel/irq.c:233 [inline]
__common_interrupt+0xd7/0x1e0 arch/x86/kernel/irq.c:252
common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:242
asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:667
native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
default_idle+0xb/0x10 arch/x86/kernel/process.c:728
default_idle_call+0x81/0xc0 kernel/sched/idle.c:112
cpuidle_idle_call kernel/sched/idle.c:194 [inline]
do_idle+0x21b/0x5b0 kernel/sched/idle.c:306
cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403
start_kernel+0x486/0x530 init/main.c:1140
secondary_startup_64_no_verify+0xb1/0xbb
-> #1 (&port_lock_key){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
serial8250_console_write+0x170/0xf80 drivers/tty/serial/8250/8250_port.c:3363
call_console_drivers kernel/printk/printk.c:-1 [inline]
console_unlock+0xc86/0x1200 kernel/printk/printk.c:2744
vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274
_printk+0xcc/0x110 kernel/printk/printk.c:2299
register_console+0x682/0x960 kernel/printk/printk.c:3107
univ8250_console_init+0x41/0x50 drivers/tty/serial/8250/8250_core.c:690
console_init+0x177/0x5d0 kernel/printk/printk.c:3207
start_kernel+0x2f9/0x530 init/main.c:1076
secondary_startup_64_no_verify+0xb1/0xbb
-> #0 (console_owner){-...}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
console_lock_spinning_enable+0x51/0x60 kernel/printk/printk.c:1805
console_unlock+0x9f8/0x1200 kernel/printk/printk.c:2741
vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274
_printk+0xcc/0x110 kernel/printk/printk.c:2299
fail_dump lib/fault-inject.c:45 [inline]
should_fail+0x36d/0x4c0 lib/fault-inject.c:146
__copy_to_user_inatomic include/linux/uaccess.h:133 [inline]
copy_to_user_nofault+0x101/0x1e0 mm/maccess.c:255
bpf_prog_c7763bb3f68e5cb3+0x38/0xf60
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:1878 [inline]
bpf_trace_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916
__traceiter_sched_switch+0x83/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1d8b/0x43b0 kernel/sched/core.c:6373
preempt_schedule_notrace+0xca/0x110 kernel/sched/core.c:6631
preempt_schedule_notrace_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
trace_lock_release include/trace/events/lock.h:58 [inline]
lock_release+0x83b/0x870 kernel/locking/lockdep.c:5634
_copy_from_user+0x29/0x170 lib/usercopy.c:14
copy_from_user include/linux/uaccess.h:192 [inline]
__copy_msghdr_from_user+0xaf/0x5e0 net/socket.c:2318
copy_msghdr_from_user net/socket.c:2369 [inline]
sendmsg_copy_msghdr net/socket.c:2467 [inline]
___sys_sendmsg+0x156/0x260 net/socket.c:2486
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg+0x190/0x250 net/socket.c:2526
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
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.0.647/6043:
#0: ffff888023d8dc28 (&mm->mmap_lock){++++}-{3:3}, at: __might_fault+0x90/0x110 mm/memory.c:5356
#1: ffff8880b903a318 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
#2: ffffffff8c11c360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
#3: ffffffff8c110e80 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0xa7/0x150 kernel/printk/printk.c:2273
stack backtrace:
CPU: 0 PID: 6043 Comm: syz.0.647 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
check_noncircular+0x274/0x310 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 kernel/locking/lockdep.c:3788 [inline]
__lock_acquire+0x2c33/0x7c60 kernel/locking/lockdep.c:5012
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
console_lock_spinning_enable+0x51/0x60 kernel/printk/printk.c:1805
console_unlock+0x9f8/0x1200 kernel/printk/printk.c:2741
vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274
_printk+0xcc/0x110 kernel/printk/printk.c:2299
fail_dump lib/fault-inject.c:45 [inline]
should_fail+0x36d/0x4c0 lib/fault-inject.c:146
__copy_to_user_inatomic include/linux/uaccess.h:133 [inline]
copy_to_user_nofault+0x101/0x1e0 mm/maccess.c:255
bpf_prog_c7763bb3f68e5cb3+0x38/0xf60
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:1878 [inline]
bpf_trace_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916
__traceiter_sched_switch+0x83/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1d8b/0x43b0 kernel/sched/core.c:6373
preempt_schedule_notrace+0xca/0x110 kernel/sched/core.c:6631
preempt_schedule_notrace_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
trace_lock_release include/trace/events/lock.h:58 [inline]
lock_release+0x83b/0x870 kernel/locking/lockdep.c:5634
_copy_from_user+0x29/0x170 lib/usercopy.c:14
copy_from_user include/linux/uaccess.h:192 [inline]
__copy_msghdr_from_user+0xaf/0x5e0 net/socket.c:2318
copy_msghdr_from_user net/socket.c:2369 [inline]
sendmsg_copy_msghdr net/socket.c:2467 [inline]
___sys_sendmsg+0x156/0x260 net/socket.c:2486
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg+0x190/0x250 net/socket.c:2526
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f88dadafbe9
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:00007f88d9017038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f88dafd6fa0 RCX: 00007f88dadafbe9
RDX: 0000000000000000 RSI: 0000200000000100 RDI: 0000000000000005
RBP: 00007f88d9017090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f88dafd7038 R14: 00007f88dafd6fa0 R15: 00007ffddb119cb8
CPU: 0 PID: 6043 Comm: syz.0.647 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
fail_dump lib/fault-inject.c:52 [inline]
should_fail+0x38c/0x4c0 lib/fault-inject.c:146
__copy_to_user_inatomic include/linux/uaccess.h:133 [inline]
copy_to_user_nofault+0x101/0x1e0 mm/maccess.c:255
bpf_prog_c7763bb3f68e5cb3+0x38/0xf60
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:1878 [inline]
bpf_trace_run3+0x17e/0x320 kernel/trace/bpf_trace.c:1916
__traceiter_sched_switch+0x83/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1d8b/0x43b0 kernel/sched/core.c:6373
preempt_schedule_notrace+0xca/0x110 kernel/sched/core.c:6631
preempt_schedule_notrace_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
trace_lock_release include/trace/events/lock.h:58 [inline]
lock_release+0x83b/0x870 kernel/locking/lockdep.c:5634
_copy_from_user+0x29/0x170 lib/usercopy.c:14
copy_from_user include/linux/uaccess.h:192 [inline]
__copy_msghdr_from_user+0xaf/0x5e0 net/socket.c:2318
copy_msghdr_from_user net/socket.c:2369 [inline]
sendmsg_copy_msghdr net/socket.c:2467 [inline]
___sys_sendmsg+0x156/0x260 net/socket.c:2486
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg+0x190/0x250 net/socket.c:2526
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f88dadafbe9
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:00007f88d9017038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f88dafd6fa0 RCX: 00007f88dadafbe9
RDX: 0000000000000000 RSI: 0000200000000100 RDI: 0000000000000005
RBP: 00007f88d9017090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007f88dafd7038 R14: 00007f88dafd6fa0 R15: 00007ffddb119cb8
__nla_validate_parse: 7 callbacks suppressed
netlink: 196 bytes leftover after parsing attributes in process `syz.0.647'.