FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
5.15.164-syzkaller #0 Not tainted
------------------------------------------------------
syz.4.2349/12406 is trying to acquire lock:
ffffffff8c7fc378 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138
but task is already holding lock:
ffff8880b9a3a358 (&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:
-> #2 (&rq->__lock){-.-.}-{2:2}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
_raw_spin_lock_nested+0x2d/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+0x5d/0x350 kernel/sched/fair.c:11495
sched_cgroup_fork+0x2d3/0x330 kernel/sched/core.c:4466
copy_process+0x224a/0x3ef0 kernel/fork.c:2320
kernel_clone+0x210/0x960 kernel/fork.c:2604
kernel_thread+0x168/0x1e0 kernel/fork.c:2656
rest_init+0x21/0x330 init/main.c:706
start_kernel+0x48c/0x540 init/main.c:1140
secondary_startup_64_no_verify+0xb1/0xbb
-> #1 (&p->pi_lock){-.-.}-{2:2}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
try_to_wake_up+0xae/0x1300 kernel/sched/core.c:4030
up+0x6e/0x90 kernel/locking/semaphore.c:190
__up_console_sem+0x11a/0x1e0 kernel/printk/printk.c:256
console_unlock+0x1145/0x12b0 kernel/printk/printk.c:2760
vprintk_emit+0xbf/0x150 kernel/printk/printk.c:2274
_printk+0xd1/0x120 kernel/printk/printk.c:2299
__xfs_printk fs/xfs/xfs_message.c:24 [inline]
xfs_notice+0x1c8/0x320 fs/xfs/xfs_message.c:56
xfs_qm_quotacheck+0x149/0x640 fs/xfs/xfs_qm.c:1294
xfs_qm_mount_quotas+0x328/0x610 fs/xfs/xfs_qm.c:1448
xfs_mountfs+0x166a/0x1ce0 fs/xfs/xfs_mount.c:904
xfs_fs_fill_super+0x11b4/0x1400 fs/xfs/xfs_super.c:1676
get_tree_bdev+0x3fe/0x620 fs/super.c:1312
vfs_get_tree+0x88/0x270 fs/super.c:1517
do_new_mount+0x2ba/0xb40 fs/namespace.c:3005
do_mount fs/namespace.c:3348 [inline]
__do_sys_mount fs/namespace.c:3556 [inline]
__se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
-> #0 ((console_sem).lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138
__down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:239
console_trylock kernel/printk/printk.c:2575 [inline]
console_trylock_spinning+0x8a/0x3f0 kernel/printk/printk.c:1867
vprintk_emit+0xa6/0x150 kernel/printk/printk.c:2273
_printk+0xd1/0x120 kernel/printk/printk.c:2299
fail_dump lib/fault-inject.c:45 [inline]
should_fail+0x36c/0x4c0 lib/fault-inject.c:146
strncpy_from_user+0x32/0x370 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x6c/0x130 mm/maccess.c:295
bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:194 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:300 [inline]
bpf_probe_read_compat_str+0xe4/0x180 kernel/trace/bpf_trace.c:296
bpf_prog_c1796171ffc7efef+0x35/0x1ac
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:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__traceiter_sched_switch+0x7d/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1e8d/0x45b0 kernel/sched/core.c:6373
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780
irqentry_exit+0x53/0x80 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:643
get_current arch/x86/include/asm/current.h:15 [inline]
__syscall_enter_from_user_work kernel/entry/common.c:93 [inline]
syscall_enter_from_user_mode+0x37/0x240 kernel/entry/common.c:114
do_syscall_64+0x1e/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x66/0xd0
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.4.2349/12406:
#0: ffff8880b9a3a358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
#1: ffffffff8c91fb20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311
stack backtrace:
CPU: 0 PID: 12406 Comm: syz.4.2349 Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
check_noncircular+0x2f8/0x3b0 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+0x1649/0x5930 kernel/locking/lockdep.c:3788
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138
__down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:239
console_trylock kernel/printk/printk.c:2575 [inline]
console_trylock_spinning+0x8a/0x3f0 kernel/printk/printk.c:1867
vprintk_emit+0xa6/0x150 kernel/printk/printk.c:2273
_printk+0xd1/0x120 kernel/printk/printk.c:2299
fail_dump lib/fault-inject.c:45 [inline]
should_fail+0x36c/0x4c0 lib/fault-inject.c:146
strncpy_from_user+0x32/0x370 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x6c/0x130 mm/maccess.c:295
bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:194 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:300 [inline]
bpf_probe_read_compat_str+0xe4/0x180 kernel/trace/bpf_trace.c:296
bpf_prog_c1796171ffc7efef+0x35/0x1ac
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:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__traceiter_sched_switch+0x7d/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1e8d/0x45b0 kernel/sched/core.c:6373
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780
irqentry_exit+0x53/0x80 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:643
RIP: 0010:__syscall_enter_from_user_work kernel/entry/common.c:93 [inline]
RIP: 0010:syscall_enter_from_user_mode+0x37/0x240 kernel/entry/common.c:114
Code: 49 89 fe 48 8b 7c 24 30 e8 46 f6 ff ff e9 8d 01 00 00 e9 91 01 00 00 e8 57 cb 53 f7 e8 42 c9 53 f7 fb 65 4c 8b 3d 29 57 cf 75 <49> 8b 5f 08 f6 c3 3f 0f 84 ce 00 00 00 f6 c3 20 74 17 4c 89 f7 e8
RSP: 0018:ffffc900032e7ef8 EFLAGS: 00000282
RAX: b84fe931b11f8800 RBX: ffffc900032e7f30 RCX: ffffffff91467f03
RDX: dffffc0000000000 RSI: ffffffff8a8b2a00 RDI: ffffffff8ad8f800
RBP: ffffc900032e7f48 R08: ffffffff8186e200 R09: fffffbfff1bd2986
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000057 R14: ffffc900032e7f58 R15: ffff888020dbbb80
do_syscall_64+0x1e/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f6df34a03b9
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:00007f6df18dd048 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 00007f6df362f130 RCX: 00007f6df34a03b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00007f6df18dd0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000000000000006e R14: 00007f6df362f130 R15: 00007ffdb15b4d28
CPU: 0 PID: 12406 Comm: syz.4.2349 Not tainted 5.15.164-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
fail_dump lib/fault-inject.c:52 [inline]
should_fail+0x38a/0x4c0 lib/fault-inject.c:146
strncpy_from_user+0x32/0x370 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x6c/0x130 mm/maccess.c:295
bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:194 [inline]
____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:300 [inline]
bpf_probe_read_compat_str+0xe4/0x180 kernel/trace/bpf_trace.c:296
bpf_prog_c1796171ffc7efef+0x35/0x1ac
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:1880 [inline]
bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918
__traceiter_sched_switch+0x7d/0xb0 include/trace/events/sched.h:220
trace_sched_switch include/trace/events/sched.h:220 [inline]
__schedule+0x1e8d/0x45b0 kernel/sched/core.c:6373
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780
irqentry_exit+0x53/0x80 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:643
RIP: 0010:__syscall_enter_from_user_work kernel/entry/common.c:93 [inline]
RIP: 0010:syscall_enter_from_user_mode+0x37/0x240 kernel/entry/common.c:114
Code: 49 89 fe 48 8b 7c 24 30 e8 46 f6 ff ff e9 8d 01 00 00 e9 91 01 00 00 e8 57 cb 53 f7 e8 42 c9 53 f7 fb 65 4c 8b 3d 29 57 cf 75 <49> 8b 5f 08 f6 c3 3f 0f 84 ce 00 00 00 f6 c3 20 74 17 4c 89 f7 e8
RSP: 0018:ffffc900032e7ef8 EFLAGS: 00000282
RAX: b84fe931b11f8800 RBX: ffffc900032e7f30 RCX: ffffffff91467f03
RDX: dffffc0000000000 RSI: ffffffff8a8b2a00 RDI: ffffffff8ad8f800
RBP: ffffc900032e7f48 R08: ffffffff8186e200 R09: fffffbfff1bd2986
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: 0000000000000057 R14: ffffc900032e7f58 R15: ffff888020dbbb80
do_syscall_64+0x1e/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f6df34a03b9
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:00007f6df18dd048 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 00007f6df362f130 RCX: 00007f6df34a03b9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200001c0
RBP: 00007f6df18dd0a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000000000000006e R14: 00007f6df362f130 R15: 00007ffdb15b4d28
----------------
Code disassembly (best guess):
0: 49 89 fe mov %rdi,%r14
3: 48 8b 7c 24 30 mov 0x30(%rsp),%rdi
8: e8 46 f6 ff ff call 0xfffff653
d: e9 8d 01 00 00 jmp 0x19f
12: e9 91 01 00 00 jmp 0x1a8
17: e8 57 cb 53 f7 call 0xf753cb73
1c: e8 42 c9 53 f7 call 0xf753c963
21: fb sti
22: 65 4c 8b 3d 29 57 cf mov %gs:0x75cf5729(%rip),%r15 # 0x75cf5753
29: 75
* 2a: 49 8b 5f 08 mov 0x8(%r15),%rbx <-- trapping instruction
2e: f6 c3 3f test $0x3f,%bl
31: 0f 84 ce 00 00 00 je 0x105
37: f6 c3 20 test $0x20,%bl
3a: 74 17 je 0x53
3c: 4c 89 f7 mov %r14,%rdi
3f: e8 .byte 0xe8