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-syzkaller-02574-ga430d95c5efa #0 Not tainted ------------------------------------------------------ syz.3.136/6362 is trying to acquire lock: ffffffff8dda86f8 ((console_sem).lock){-...}-{2:2}, at: down_trylock+0x12/0x70 kernel/locking/semaphore.c:139 but task is already holding lock: ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:568 [inline] ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:553 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:560 raw_spin_rq_lock kernel/sched/sched.h:1415 [inline] rq_lock kernel/sched/sched.h:1714 [inline] task_fork_fair+0x73/0x250 kernel/sched/fair.c:12710 sched_cgroup_fork+0x3cf/0x510 kernel/sched/core.c:4633 copy_process+0x439b/0x8dd0 kernel/fork.c:2483 kernel_clone+0xfd/0x960 kernel/fork.c:2781 user_mode_thread+0xb4/0xf0 kernel/fork.c:2859 rest_init+0x23/0x2b0 init/main.c:712 start_kernel+0x3e4/0x4d0 init/main.c:1105 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488 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+0x9a/0x13e0 kernel/sched/core.c:4051 up+0x79/0xb0 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:340 [inline] __console_unlock kernel/printk/printk.c:2802 [inline] console_unlock+0x23e/0x290 kernel/printk/printk.c:3121 con_install+0x161/0x600 drivers/tty/vt/vt.c:3547 tty_driver_install_tty drivers/tty/tty_io.c:1310 [inline] tty_init_dev.part.0+0x99/0x660 drivers/tty/tty_io.c:1422 tty_init_dev include/linux/err.h:61 [inline] tty_open_by_driver drivers/tty/tty_io.c:2088 [inline] tty_open+0xac1/0xf80 drivers/tty/tty_io.c:2135 chrdev_open+0x237/0x6a0 fs/char_dev.c:414 do_dentry_open+0x6ca/0x1530 fs/open.c:958 vfs_open+0x82/0x3f0 fs/open.c:1088 do_open fs/namei.c:3774 [inline] path_openat+0x1e6a/0x2d60 fs/namei.c:3933 do_filp_open+0x1dc/0x430 fs/namei.c:3960 do_sys_openat2+0x17a/0x1e0 fs/open.c:1415 do_sys_open fs/open.c:1430 [inline] __do_sys_openat fs/open.c:1446 [inline] __se_sys_openat fs/open.c:1441 [inline] __x64_sys_openat+0x175/0x210 fs/open.c:1441 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:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142 lock_acquire kernel/locking/lockdep.c:5759 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724 __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:323 console_trylock kernel/printk/printk.c:2755 [inline] console_trylock_spinning kernel/printk/printk.c:1958 [inline] vprintk_emit+0x3d3/0x600 kernel/printk/printk.c:2347 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2373 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x46c/0x5b0 lib/fault-inject.c:153 strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:311 [inline] bpf_probe_read_compat_str+0xf1/0x170 kernel/trace/bpf_trace.c:307 bpf_prog_f2ce78ec2d45df6f+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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449 __bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x17cf/0x5490 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6621 schedule_hrtimeout_range_clock+0x3c7/0x430 kernel/time/hrtimer.c:2275 poll_schedule_timeout.constprop.0+0xba/0x190 fs/select.c:244 do_select+0x12ec/0x17b0 fs/select.c:607 core_sys_select+0x459/0xb80 fs/select.c:681 do_pselect.constprop.0+0x1a0/0x1f0 fs/select.c:763 __do_sys_pselect6 fs/select.c:804 [inline] __se_sys_pselect6 fs/select.c:795 [inline] __x64_sys_pselect6+0x183/0x240 fs/select.c:795 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.3.136/6362: #0: ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:568 [inline] #0: ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:553 #1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline] #1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x1d6/0x5a0 kernel/trace/bpf_trace.c:2449 stack backtrace: CPU: 0 UID: 0 PID: 6362 Comm: syz.3.136 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2186 check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain kernel/locking/lockdep.c:3868 [inline] __lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142 lock_acquire kernel/locking/lockdep.c:5759 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724 __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:323 console_trylock kernel/printk/printk.c:2755 [inline] console_trylock_spinning kernel/printk/printk.c:1958 [inline] vprintk_emit+0x3d3/0x600 kernel/printk/printk.c:2347 vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2373 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x46c/0x5b0 lib/fault-inject.c:153 strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:311 [inline] bpf_probe_read_compat_str+0xf1/0x170 kernel/trace/bpf_trace.c:307 bpf_prog_f2ce78ec2d45df6f+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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449 __bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x17cf/0x5490 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6621 schedule_hrtimeout_range_clock+0x3c7/0x430 kernel/time/hrtimer.c:2275 poll_schedule_timeout.constprop.0+0xba/0x190 fs/select.c:244 do_select+0x12ec/0x17b0 fs/select.c:607 core_sys_select+0x459/0xb80 fs/select.c:681 do_pselect.constprop.0+0x1a0/0x1f0 fs/select.c:763 __do_sys_pselect6 fs/select.c:804 [inline] __se_sys_pselect6 fs/select.c:795 [inline] __x64_sys_pselect6+0x183/0x240 fs/select.c:795 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:0x7f7feb77def9 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:00007f7fec636038 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 00007f7feb936058 RCX: 00007f7feb77def9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000040 RBP: 00007f7fec636090 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f7feb936058 R15: 00007ffd31cf9be8 CPU: 0 UID: 0 PID: 6362 Comm: syz.3.136 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 fail_dump lib/fault-inject.c:52 [inline] should_fail_ex+0x497/0x5b0 lib/fault-inject.c:153 strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x7f/0x180 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_compat_str kernel/trace/bpf_trace.c:311 [inline] bpf_probe_read_compat_str+0xf1/0x170 kernel/trace/bpf_trace.c:307 bpf_prog_f2ce78ec2d45df6f+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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449 __bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x17cf/0x5490 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6621 schedule_hrtimeout_range_clock+0x3c7/0x430 kernel/time/hrtimer.c:2275 poll_schedule_timeout.constprop.0+0xba/0x190 fs/select.c:244 do_select+0x12ec/0x17b0 fs/select.c:607 core_sys_select+0x459/0xb80 fs/select.c:681 do_pselect.constprop.0+0x1a0/0x1f0 fs/select.c:763 __do_sys_pselect6 fs/select.c:804 [inline] __se_sys_pselect6 fs/select.c:795 [inline] __x64_sys_pselect6+0x183/0x240 fs/select.c:795 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:0x7f7feb77def9 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:00007f7fec636038 EFLAGS: 00000246 ORIG_RAX: 000000000000010e RAX: ffffffffffffffda RBX: 00007f7feb936058 RCX: 00007f7feb77def9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000040 RBP: 00007f7fec636090 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000001 R14: 00007f7feb936058 R15: 00007ffd31cf9be8