FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
6.14.0-rc6-syzkaller-00103-g4003c9e78778 #0 Not tainted
------------------------------------------------------
syz.5.1213/10614 is trying to acquire lock:
ffffffff8e1aaeb8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
but task is already holding lock:
ffff8880b863ec18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:606 [inline]
ffff8880b863ec18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:591
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&rq->__lock){-.-.}-{2:2}:
_raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378
raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598
raw_spin_rq_lock kernel/sched/sched.h:1521 [inline]
task_rq_lock+0xcf/0x3b0 kernel/sched/core.c:700
cgroup_move_task+0x82/0x250 kernel/sched/psi.c:1161
css_set_move_task+0x288/0x5f0 kernel/cgroup/cgroup.c:898
cgroup_post_fork+0x202/0x9d0 kernel/cgroup/cgroup.c:6695
copy_process+0x4ffd/0x8c50 kernel/fork.c:2629
kernel_clone+0xfd/0x960 kernel/fork.c:2815
user_mode_thread+0xc9/0x110 kernel/fork.c:2893
rest_init+0x23/0x2b0 init/main.c:708
start_kernel+0x3e9/0x4d0 init/main.c:1099
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:515
x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:496
common_startup_64+0x13e/0x148
-> #1 (&p->pi_lock){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline]
try_to_wake_up+0xb6/0x1490 kernel/sched/core.c:4214
up+0x79/0xb0 kernel/locking/semaphore.c:191
__up_console_sem+0x85/0xe0 kernel/printk/printk.c:343
__console_unlock kernel/printk/printk.c:2869 [inline]
__console_flush_and_unlock kernel/printk/printk.c:3271 [inline]
console_unlock+0x1dc/0x210 kernel/printk/printk.c:3309
vt_ioctl+0xe51/0x2f80 drivers/tty/vt/vt_ioctl.c:888
tty_ioctl+0x651/0x15d0 drivers/tty/tty_io.c:2802
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:906 [inline]
__se_sys_ioctl fs/ioctl.c:892 [inline]
__x64_sys_ioctl+0x190/0x200 fs/ioctl.c:892
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 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:3163 [inline]
check_prevs_add kernel/locking/lockdep.c:3282 [inline]
validate_chain kernel/locking/lockdep.c:3906 [inline]
__lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x40/0x140 kernel/printk/printk.c:326
console_trylock kernel/printk/printk.c:2852 [inline]
console_trylock_spinning kernel/printk/printk.c:2009 [inline]
vprintk_emit+0x3ec/0x6f0 kernel/printk/printk.c:2431
_printk+0xc8/0x100 kernel/printk/printk.c:2457
fail_dump lib/fault-inject.c:66 [inline]
should_fail_ex+0x4df/0x650 lib/fault-inject.c:174
strncpy_from_user+0x3b/0x2d0 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:193
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+0xf1/0x170 kernel/trace/bpf_trace.c:306
bpf_prog_c1796171ffc7efef+0x3e/0x40
bpf_dispatcher_nop_func include/linux/bpf.h:1290 [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:2371 [inline]
bpf_trace_run4+0x245/0x5a0 kernel/trace/bpf_trace.c:2414
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
__do_trace_sched_switch include/trace/events/sched.h:222 [inline]
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x160c/0x5890 kernel/sched/core.c:6762
preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7087
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5928
lock_is_held include/linux/lockdep.h:249 [inline]
__might_resched+0x473/0x5e0 kernel/sched/core.c:8729
__might_fault+0x83/0x190 mm/memory.c:6855
_inline_copy_from_user include/linux/uaccess.h:162 [inline]
_copy_from_user+0x29/0xd0 lib/usercopy.c:18
copy_from_user include/linux/uaccess.h:212 [inline]
memdup_user+0x71/0xd0 mm/util.c:222
strndup_user+0x78/0xe0 mm/util.c:277
copy_mount_string fs/namespace.c:3795 [inline]
__do_sys_mount fs/namespace.c:4101 [inline]
__se_sys_mount fs/namespace.c:4088 [inline]
__x64_sys_mount+0x181/0x310 fs/namespace.c:4088
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 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 --> &p->pi_lock --> &rq->__lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&rq->__lock);
lock(&p->pi_lock);
lock(&rq->__lock);
lock((console_sem).lock);
*** DEADLOCK ***
2 locks held by syz.5.1213/10614:
#0: ffff8880b863ec18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:606 [inline]
#0: ffff8880b863ec18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:591
#1: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#1: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#1: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2370 [inline]
#1: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run4+0x1d6/0x5a0 kernel/trace/bpf_trace.c:2414
stack backtrace:
CPU: 0 UID: 0 PID: 10614 Comm: syz.5.1213 Not tainted 6.14.0-rc6-syzkaller-00103-g4003c9e78778 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_circular_bug+0x490/0x760 kernel/locking/lockdep.c:2076
check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2208
check_prev_add kernel/locking/lockdep.c:3163 [inline]
check_prevs_add kernel/locking/lockdep.c:3282 [inline]
validate_chain kernel/locking/lockdep.c:3906 [inline]
__lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228
lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x40/0x140 kernel/printk/printk.c:326
console_trylock kernel/printk/printk.c:2852 [inline]
console_trylock_spinning kernel/printk/printk.c:2009 [inline]
vprintk_emit+0x3ec/0x6f0 kernel/printk/printk.c:2431
_printk+0xc8/0x100 kernel/printk/printk.c:2457
fail_dump lib/fault-inject.c:66 [inline]
should_fail_ex+0x4df/0x650 lib/fault-inject.c:174
strncpy_from_user+0x3b/0x2d0 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:193
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+0xf1/0x170 kernel/trace/bpf_trace.c:306
bpf_prog_c1796171ffc7efef+0x3e/0x40
bpf_dispatcher_nop_func include/linux/bpf.h:1290 [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:2371 [inline]
bpf_trace_run4+0x245/0x5a0 kernel/trace/bpf_trace.c:2414
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
__do_trace_sched_switch include/trace/events/sched.h:222 [inline]
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x160c/0x5890 kernel/sched/core.c:6762
preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7087
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5928
Code: 00 00 b8 ff ff ff ff 65 0f c1 05 3c 15 ab 74 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 45 31 ed eb
RSP: 0018:ffffc90003cafd30 EFLAGS: 00000296
RAX: 0000000000000046 RBX: 1ffff92000795faf RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8b6cff80 RDI: ffffffff8bd36ae0
RBP: ffffffff8e1bd0e0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888061bd4880
R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000
lock_is_held include/linux/lockdep.h:249 [inline]
__might_resched+0x473/0x5e0 kernel/sched/core.c:8729
__might_fault+0x83/0x190 mm/memory.c:6855
_inline_copy_from_user include/linux/uaccess.h:162 [inline]
_copy_from_user+0x29/0xd0 lib/usercopy.c:18
copy_from_user include/linux/uaccess.h:212 [inline]
memdup_user+0x71/0xd0 mm/util.c:222
strndup_user+0x78/0xe0 mm/util.c:277
copy_mount_string fs/namespace.c:3795 [inline]
__do_sys_mount fs/namespace.c:4101 [inline]
__se_sys_mount fs/namespace.c:4088 [inline]
__x64_sys_mount+0x181/0x310 fs/namespace.c:4088
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f197978d169
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:00007f197a57d038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f19799a6160 RCX: 00007f197978d169
RDX: 0000400000000080 RSI: 00004000000002c0 RDI: 0000400000000100
RBP: 00007f197a57d090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f19799a6160 R15: 00007ffce50ca988
CPU: 0 UID: 0 PID: 10614 Comm: syz.5.1213 Not tainted 6.14.0-rc6-syzkaller-00103-g4003c9e78778 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
fail_dump lib/fault-inject.c:73 [inline]
should_fail_ex+0x50a/0x650 lib/fault-inject.c:174
strncpy_from_user+0x3b/0x2d0 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:193
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+0xf1/0x170 kernel/trace/bpf_trace.c:306
bpf_prog_c1796171ffc7efef+0x3e/0x40
bpf_dispatcher_nop_func include/linux/bpf.h:1290 [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:2371 [inline]
bpf_trace_run4+0x245/0x5a0 kernel/trace/bpf_trace.c:2414
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
__do_trace_sched_switch include/trace/events/sched.h:222 [inline]
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x160c/0x5890 kernel/sched/core.c:6762
preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7087
irqentry_exit+0x36/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:lock_is_held_type+0x107/0x150 kernel/locking/lockdep.c:5928
Code: 00 00 b8 ff ff ff ff 65 0f c1 05 3c 15 ab 74 83 f8 01 75 2d 9c 58 f6 c4 02 75 43 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 <44> 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc 45 31 ed eb
RSP: 0018:ffffc90003cafd30 EFLAGS: 00000296
RAX: 0000000000000046 RBX: 1ffff92000795faf RCX: 0000000000000001
RDX: 0000000000000000 RSI: ffffffff8b6cff80 RDI: ffffffff8bd36ae0
RBP: ffffffff8e1bd0e0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff888061bd4880
R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000000
lock_is_held include/linux/lockdep.h:249 [inline]
__might_resched+0x473/0x5e0 kernel/sched/core.c:8729
__might_fault+0x83/0x190 mm/memory.c:6855
_inline_copy_from_user include/linux/uaccess.h:162 [inline]
_copy_from_user+0x29/0xd0 lib/usercopy.c:18
copy_from_user include/linux/uaccess.h:212 [inline]
memdup_user+0x71/0xd0 mm/util.c:222
strndup_user+0x78/0xe0 mm/util.c:277
copy_mount_string fs/namespace.c:3795 [inline]
__do_sys_mount fs/namespace.c:4101 [inline]
__se_sys_mount fs/namespace.c:4088 [inline]
__x64_sys_mount+0x181/0x310 fs/namespace.c:4088
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f197978d169
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:00007f197a57d038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f19799a6160 RCX: 00007f197978d169
RDX: 0000400000000080 RSI: 00004000000002c0 RDI: 0000400000000100
RBP: 00007f197a57d090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f19799a6160 R15: 00007ffce50ca988
ISOFS: Unable to identify CD-ROM format.
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: b8 ff ff ff ff mov $0xffffffff,%eax
7: 65 0f c1 05 3c 15 ab xadd %eax,%gs:0x74ab153c(%rip) # 0x74ab154b
e: 74
f: 83 f8 01 cmp $0x1,%eax
12: 75 2d jne 0x41
14: 9c pushf
15: 58 pop %rax
16: f6 c4 02 test $0x2,%ah
19: 75 43 jne 0x5e
1b: 48 f7 04 24 00 02 00 testq $0x200,(%rsp)
22: 00
23: 74 01 je 0x26
25: fb sti
26: 48 83 c4 08 add $0x8,%rsp
* 2a: 44 89 e8 mov %r13d,%eax <-- trapping instruction
2d: 5b pop %rbx
2e: 5d pop %rbp
2f: 41 5c pop %r12
31: 41 5d pop %r13
33: 41 5e pop %r14
35: 41 5f pop %r15
37: c3 ret
38: cc int3
39: cc int3
3a: cc int3
3b: cc int3
3c: 45 31 ed xor %r13d,%r13d
3f: eb .byte 0xeb