FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
6.12.0-rc4-syzkaller-00261-g850925a8133c #0 Not tainted
------------------------------------------------------
syz.2.2606/14722 is trying to acquire lock:
ffffffff8e813498 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139
but task is already holding lock:
ffff8880b862a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (&base->lock){-.-.}-{2:2}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
__mod_timer+0x1ca/0xeb0 kernel/time/timer.c:1132
queue_delayed_work_on+0x1ca/0x390 kernel/workqueue.c:2552
psi_task_change+0xed/0x270 kernel/sched/psi.c:912
psi_enqueue kernel/sched/stats.h:158 [inline]
enqueue_task+0x2de/0x340 kernel/sched/core.c:2029
activate_task kernel/sched/core.c:2067 [inline]
wake_up_new_task+0x576/0xc70 kernel/sched/core.c:4829
kernel_clone+0x475/0x880 kernel/fork.c:2815
user_mode_thread+0x132/0x1a0 kernel/fork.c:2862
rest_init+0x23/0x300 init/main.c:712
start_kernel+0x47f/0x500 init/main.c:1105
x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507
x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:488
common_startup_64+0x13e/0x147
-> #2 (&rq->__lock){-.-.}-{2:2}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
_raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378
raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598
raw_spin_rq_lock kernel/sched/sched.h:1505 [inline]
task_rq_lock+0xc6/0x360 kernel/sched/core.c:700
cgroup_move_task+0x9b/0x5a0 kernel/sched/psi.c:1161
css_set_move_task+0x72e/0x950 kernel/cgroup/cgroup.c:898
cgroup_post_fork+0x256/0x880 kernel/cgroup/cgroup.c:6692
copy_process+0x39e9/0x3d50 kernel/fork.c:2598
kernel_clone+0x223/0x880 kernel/fork.c:2784
user_mode_thread+0x132/0x1a0 kernel/fork.c:2862
rest_init+0x23/0x300 init/main.c:712
start_kernel+0x47f/0x500 init/main.c:1105
x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507
x86_64_start_kernel+0x9f/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:5825
__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:551 [inline]
try_to_wake_up+0xbe/0x14b0 kernel/sched/core.c:4165
up+0x72/0x90 kernel/locking/semaphore.c:191
__up_console_sem kernel/printk/printk.c:343 [inline]
__console_unlock+0x101/0x1f0 kernel/printk/printk.c:2844
__console_flush_and_unlock kernel/printk/printk.c:3241 [inline]
console_unlock+0x18f/0x3b0 kernel/printk/printk.c:3279
vprintk_emit+0x730/0xa10 kernel/printk/printk.c:2407
_printk+0xd5/0x120 kernel/printk/printk.c:2432
printk_stack_address arch/x86/kernel/dumpstack.c:72 [inline]
show_trace_log_lvl+0x38a/0x410 arch/x86/kernel/dumpstack.c:285
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:53 [inline]
should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:154
_inline_copy_from_user include/linux/uaccess.h:162 [inline]
_copy_from_user+0x31/0xe0 lib/usercopy.c:18
copy_from_user include/linux/uaccess.h:203 [inline]
copy_from_sockptr_offset include/linux/sockptr.h:48 [inline]
copy_from_sockptr+0x62/0xa0 include/linux/sockptr.h:59
ip_mroute_setsockopt+0x6b0/0x1190 net/ipv4/ipmr.c:1430
do_ip_setsockopt+0x129f/0x3cd0 net/ipv4/ip_sockglue.c:948
ip_setsockopt+0x63/0x100 net/ipv4/ip_sockglue.c:1417
do_sock_setsockopt+0x3af/0x720 net/socket.c:2334
__sys_setsockopt+0x1a2/0x250 net/socket.c:2357
__do_sys_setsockopt net/socket.c:2366 [inline]
__se_sys_setsockopt net/socket.c:2363 [inline]
__x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2363
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 ((console_sem).lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3161 [inline]
check_prevs_add kernel/locking/lockdep.c:3280 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
__lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:326
console_trylock kernel/printk/printk.c:2827 [inline]
console_trylock_spinning kernel/printk/printk.c:1990 [inline]
vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2406
_printk+0xd5/0x120 kernel/printk/printk.c:2432
fail_dump lib/fault-inject.c:46 [inline]
should_fail_ex+0x391/0x4e0 lib/fault-inject.c:154
strncpy_from_user+0x36/0x260 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:215 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:310 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:306
bpf_prog_5a96084758a59459+0x41/0x48
bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
__bpf_prog_run include/linux/filter.h:701 [inline]
bpf_prog_run include/linux/filter.h:708 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357
trace_timer_start include/trace/events/timer.h:52 [inline]
enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663
internal_add_timer kernel/time/timer.c:688 [inline]
__mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183
sk_reset_timer+0x23/0xc0 net/core/sock.c:3508
tipc_sk_finish_conn+0x16b/0x820 net/tipc/socket.c:1671
tipc_socketpair+0x25c/0x4b0 net/tipc/socket.c:3347
__sys_socketpair+0x40f/0x720 net/socket.c:1796
__do_sys_socketpair net/socket.c:1832 [inline]
__se_sys_socketpair net/socket.c:1829 [inline]
__x64_sys_socketpair+0x9b/0xb0 net/socket.c:1829
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:
(console_sem).lock --> &rq->__lock --> &base->lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&base->lock);
lock(&rq->__lock);
lock(&base->lock);
lock((console_sem).lock);
*** DEADLOCK ***
2 locks held by syz.2.2606/14722:
#0: ffff8880b862a718 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x112/0x240 kernel/time/timer.c:1051
#1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline]
#1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2357
stack backtrace:
CPU: 0 UID: 0 PID: 14722 Comm: syz.2.2606 Not tainted 6.12.0-rc4-syzkaller-00261-g850925a8133c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074
check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206
check_prev_add kernel/locking/lockdep.c:3161 [inline]
check_prevs_add kernel/locking/lockdep.c:3280 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
__lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:326
console_trylock kernel/printk/printk.c:2827 [inline]
console_trylock_spinning kernel/printk/printk.c:1990 [inline]
vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2406
_printk+0xd5/0x120 kernel/printk/printk.c:2432
fail_dump lib/fault-inject.c:46 [inline]
should_fail_ex+0x391/0x4e0 lib/fault-inject.c:154
strncpy_from_user+0x36/0x260 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:215 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:310 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:306
bpf_prog_5a96084758a59459+0x41/0x48
bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
__bpf_prog_run include/linux/filter.h:701 [inline]
bpf_prog_run include/linux/filter.h:708 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357
trace_timer_start include/trace/events/timer.h:52 [inline]
enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663
internal_add_timer kernel/time/timer.c:688 [inline]
__mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183
sk_reset_timer+0x23/0xc0 net/core/sock.c:3508
tipc_sk_finish_conn+0x16b/0x820 net/tipc/socket.c:1671
tipc_socketpair+0x25c/0x4b0 net/tipc/socket.c:3347
__sys_socketpair+0x40f/0x720 net/socket.c:1796
__do_sys_socketpair net/socket.c:1832 [inline]
__se_sys_socketpair net/socket.c:1829 [inline]
__x64_sys_socketpair+0x9b/0xb0 net/socket.c:1829
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:0x7f7de357e719
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:00007f7de42af038 EFLAGS: 00000246 ORIG_RAX: 0000000000000035
RAX: ffffffffffffffda RBX: 00007f7de3735f80 RCX: 00007f7de357e719
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 000000000000001e
RBP: 00007f7de42af090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000940 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f7de3735f80 R15: 00007ffff604c308
CPU: 0 UID: 0 PID: 14722 Comm: syz.2.2606 Not tainted 6.12.0-rc4-syzkaller-00261-g850925a8133c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:53 [inline]
should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:154
strncpy_from_user+0x36/0x260 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:215 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:310 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:306
bpf_prog_5a96084758a59459+0x41/0x48
bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
__bpf_prog_run include/linux/filter.h:701 [inline]
bpf_prog_run include/linux/filter.h:708 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357
trace_timer_start include/trace/events/timer.h:52 [inline]
enqueue_timer+0x3ce/0x570 kernel/time/timer.c:663
internal_add_timer kernel/time/timer.c:688 [inline]
__mod_timer+0xa0e/0xeb0 kernel/time/timer.c:1183
sk_reset_timer+0x23/0xc0 net/core/sock.c:3508
tipc_sk_finish_conn+0x16b/0x820 net/tipc/socket.c:1671
tipc_socketpair+0x25c/0x4b0 net/tipc/socket.c:3347
__sys_socketpair+0x40f/0x720 net/socket.c:1796
__do_sys_socketpair net/socket.c:1832 [inline]
__se_sys_socketpair net/socket.c:1829 [inline]
__x64_sys_socketpair+0x9b/0xb0 net/socket.c:1829
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:0x7f7de357e719
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:00007f7de42af038 EFLAGS: 00000246 ORIG_RAX: 0000000000000035
RAX: ffffffffffffffda RBX: 00007f7de3735f80 RCX: 00007f7de357e719
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 000000000000001e
RBP: 00007f7de42af090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000940 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f7de3735f80 R15: 00007ffff604c308