FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 0
======================================================
WARNING: possible circular locking dependency detected
6.11.0-rc1-next-20240729-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.7744/10446 is trying to acquire lock:
ffffffff8e813318 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139
but task is already holding lock:
ffff8880b923ea18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:568
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&rq->__lock){-.-.}-{2:2}:
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822
_raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378
raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:568
raw_spin_rq_lock kernel/sched/sched.h:1481 [inline]
rq_lock kernel/sched/sched.h:1780 [inline]
task_fork_fair+0x61/0x1e0 kernel/sched/fair.c:12701
sched_cgroup_fork+0x386/0x420 kernel/sched/core.c:4676
copy_process+0x2201/0x3d90 kernel/fork.c:2485
kernel_clone+0x226/0x8f0 kernel/fork.c:2788
user_mode_thread+0x132/0x1a0 kernel/fork.c:2866
rest_init+0x23/0x300 init/main.c:712
start_kernel+0x47a/0x500 init/main.c:1103
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:5822
__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+0xb0/0x1470 kernel/sched/core.c:4082
up+0x72/0x90 kernel/locking/semaphore.c:191
__up_console_sem kernel/printk/printk.c:342 [inline]
__console_unlock kernel/printk/printk.c:2848 [inline]
console_unlock+0x22f/0x4d0 kernel/printk/printk.c:3175
vprintk_emit+0x7a1/0x900 kernel/printk/printk.c:2423
dev_vprintk_emit+0x2ae/0x330 drivers/base/core.c:4909
dev_printk_emit+0xdd/0x120 drivers/base/core.c:4920
_dev_notice+0x122/0x170 drivers/base/core.c:4977
usb_parse_endpoint drivers/usb/core/config.c:423 [inline]
usb_parse_interface drivers/usb/core/config.c:594 [inline]
usb_parse_configuration drivers/usb/core/config.c:807 [inline]
usb_get_configuration+0x2fbe/0x4dc0 drivers/usb/core/config.c:956
usb_enumerate_device drivers/usb/core/hub.c:2483 [inline]
usb_new_device+0x14a/0x19a0 drivers/usb/core/hub.c:2621
hub_port_connect drivers/usb/core/hub.c:5521 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x2d6d/0x5150 drivers/usb/core/hub.c:5903
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
-> #0 ((console_sem).lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3158 [inline]
check_prevs_add kernel/locking/lockdep.c:3277 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3901
__lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822
__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:325
console_trylock kernel/printk/printk.c:2831 [inline]
console_trylock_spinning kernel/printk/printk.c:1982 [inline]
vprintk_emit+0x391/0x900 kernel/printk/printk.c:2422
_printk+0xd5/0x120 kernel/printk/printk.c:2450
fail_dump lib/fault-inject.c:45 [inline]
should_fail_ex+0x391/0x4e0 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:216 [inline]
____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline]
bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222
bpf_prog_bc7c5c6b9645592f+0x3d/0x3f
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline]
bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449
__traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2591/0x4a60 kernel/sched/core.c:6600
preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6925
irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
__slab_alloc_node mm/slub.c:3842 [inline]
slab_alloc_node mm/slub.c:4025 [inline]
kmem_cache_alloc_noprof+0x95/0x2a0 mm/slub.c:4044
getname_flags+0xb7/0x540 fs/namei.c:139
do_sys_openat2+0xd2/0x1d0 fs/open.c:1410
do_sys_open fs/open.c:1431 [inline]
__do_sys_creat fs/open.c:1507 [inline]
__se_sys_creat fs/open.c:1501 [inline]
__x64_sys_creat+0x123/0x170 fs/open.c:1501
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 --> &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.0.7744/10446:
#0: ffff8880b923ea18 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:568
#1: ffffffff8e937a60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#1: ffffffff8e937a60 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#1: ffffffff8e937a60 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline]
#1: ffffffff8e937a60 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2449
stack backtrace:
CPU: 0 UID: 0 PID: 10446 Comm: syz.0.7744 Not tainted 6.11.0-rc1-next-20240729-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:2203
check_prev_add kernel/locking/lockdep.c:3158 [inline]
check_prevs_add kernel/locking/lockdep.c:3277 [inline]
validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3901
__lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5199
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822
__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:325
console_trylock kernel/printk/printk.c:2831 [inline]
console_trylock_spinning kernel/printk/printk.c:1982 [inline]
vprintk_emit+0x391/0x900 kernel/printk/printk.c:2422
_printk+0xd5/0x120 kernel/printk/printk.c:2450
fail_dump lib/fault-inject.c:45 [inline]
should_fail_ex+0x391/0x4e0 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:216 [inline]
____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline]
bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222
bpf_prog_bc7c5c6b9645592f+0x3d/0x3f
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline]
bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449
__traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2591/0x4a60 kernel/sched/core.c:6600
preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6925
irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:__slab_alloc_node mm/slub.c:3861 [inline]
RIP: 0010:slab_alloc_node mm/slub.c:4025 [inline]
RIP: 0010:kmem_cache_alloc_noprof+0x95/0x2a0 mm/slub.c:4044
Code: 00 31 db 4d 85 ed 0f 84 f3 00 00 00 85 c0 0f 85 eb 00 00 00 0f 1f 44 00 00 65 48 8b 05 04 9c 12 7e 49 8b 4d 00 48 8b 54 08 08 <48> 8b 3c 08 48 85 ff 0f 84 09 01 00 00 48 83 7c 08 10 00 0f 84 fd
RSP: 0018:ffffc90004e0fcd0 EFLAGS: 00000246
RAX: ffff8880b9200000 RBX: 0000000000000000 RCX: 0000000000045640
RDX: 0000000000894fb0 RSI: 0000000000001000 RDI: ffffffff8ea4af60
RBP: 0000000000001000 R08: ffffffff9017d76f R09: 1ffffffff202faed
R10: dffffc0000000000 R11: fffffbfff202faee R12: dffffc0000000000
R13: ffff8880166fe780 R14: 0000000000000cc0 R15: ffffffff820ecdb7
getname_flags+0xb7/0x540 fs/namei.c:139
do_sys_openat2+0xd2/0x1d0 fs/open.c:1410
do_sys_open fs/open.c:1431 [inline]
__do_sys_creat fs/open.c:1507 [inline]
__se_sys_creat fs/open.c:1501 [inline]
__x64_sys_creat+0x123/0x170 fs/open.c:1501
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:0x7fcaf19779f9
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:00007fcaf26b0048 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fcaf1b05f80 RCX: 00007fcaf19779f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000100
RBP: 00007fcaf26b00a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000000000000000b R14: 00007fcaf1b05f80 R15: 00007ffc86a29218
CPU: 0 UID: 0 PID: 10446 Comm: syz.0.7744 Not tainted 6.11.0-rc1-next-20240729-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:52 [inline]
should_fail_ex+0x3b0/0x4e0 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:216 [inline]
____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline]
bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222
bpf_prog_bc7c5c6b9645592f+0x3d/0x3f
bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline]
__bpf_prog_run include/linux/filter.h:691 [inline]
bpf_prog_run include/linux/filter.h:698 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline]
bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449
__traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x2591/0x4a60 kernel/sched/core.c:6600
preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6925
irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707
RIP: 0010:__slab_alloc_node mm/slub.c:3861 [inline]
RIP: 0010:slab_alloc_node mm/slub.c:4025 [inline]
RIP: 0010:kmem_cache_alloc_noprof+0x95/0x2a0 mm/slub.c:4044
Code: 00 31 db 4d 85 ed 0f 84 f3 00 00 00 85 c0 0f 85 eb 00 00 00 0f 1f 44 00 00 65 48 8b 05 04 9c 12 7e 49 8b 4d 00 48 8b 54 08 08 <48> 8b 3c 08 48 85 ff 0f 84 09 01 00 00 48 83 7c 08 10 00 0f 84 fd
RSP: 0018:ffffc90004e0fcd0 EFLAGS: 00000246
RAX: ffff8880b9200000 RBX: 0000000000000000 RCX: 0000000000045640
RDX: 0000000000894fb0 RSI: 0000000000001000 RDI: ffffffff8ea4af60
RBP: 0000000000001000 R08: ffffffff9017d76f R09: 1ffffffff202faed
R10: dffffc0000000000 R11: fffffbfff202faee R12: dffffc0000000000
R13: ffff8880166fe780 R14: 0000000000000cc0 R15: ffffffff820ecdb7
getname_flags+0xb7/0x540 fs/namei.c:139
do_sys_openat2+0xd2/0x1d0 fs/open.c:1410
do_sys_open fs/open.c:1431 [inline]
__do_sys_creat fs/open.c:1507 [inline]
__se_sys_creat fs/open.c:1501 [inline]
__x64_sys_creat+0x123/0x170 fs/open.c:1501
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:0x7fcaf19779f9
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:00007fcaf26b0048 EFLAGS: 00000246 ORIG_RAX: 0000000000000055
RAX: ffffffffffffffda RBX: 00007fcaf1b05f80 RCX: 00007fcaf19779f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000100
RBP: 00007fcaf26b00a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 000000000000000b R14: 00007fcaf1b05f80 R15: 00007ffc86a29218
----------------
Code disassembly (best guess):
0: 00 31 add %dh,(%rcx)
2: db 4d 85 fisttpl -0x7b(%rbp)
5: ed in (%dx),%eax
6: 0f 84 f3 00 00 00 je 0xff
c: 85 c0 test %eax,%eax
e: 0f 85 eb 00 00 00 jne 0xff
14: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
19: 65 48 8b 05 04 9c 12 mov %gs:0x7e129c04(%rip),%rax # 0x7e129c25
20: 7e
21: 49 8b 4d 00 mov 0x0(%r13),%rcx
25: 48 8b 54 08 08 mov 0x8(%rax,%rcx,1),%rdx
* 2a: 48 8b 3c 08 mov (%rax,%rcx,1),%rdi <-- trapping instruction
2e: 48 85 ff test %rdi,%rdi
31: 0f 84 09 01 00 00 je 0x140
37: 48 83 7c 08 10 00 cmpq $0x0,0x10(%rax,%rcx,1)
3d: 0f .byte 0xf
3e: 84 fd test %bh,%ch