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-00016-g0fed89a961ea #0 Not tainted ------------------------------------------------------ syz.3.724/8489 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: ffff88802b63ed58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 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 vga_remove_vgacon drivers/pci/vgaarb.c:186 [inline] vga_remove_vgacon+0x90/0xd0 drivers/pci/vgaarb.c:167 __aperture_remove_legacy_vga_devices drivers/video/aperture.c:331 [inline] aperture_remove_conflicting_pci_devices+0x16a/0x1e0 drivers/video/aperture.c:369 bochs_pci_probe+0x29/0xcd0 drivers/gpu/drm/tiny/bochs.c:723 local_pci_probe+0xde/0x1b0 drivers/pci/pci-driver.c:324 pci_call_probe drivers/pci/pci-driver.c:392 [inline] __pci_device_probe drivers/pci/pci-driver.c:417 [inline] pci_device_probe+0x673/0x7a0 drivers/pci/pci-driver.c:451 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __driver_attach+0x283/0x580 drivers/base/dd.c:1216 bus_for_each_dev+0x13c/0x1d0 drivers/base/bus.c:370 bus_add_driver+0x2e9/0x690 drivers/base/bus.c:678 driver_register+0x15c/0x4b0 drivers/base/driver.c:249 drm_pci_register_driver_if_modeset include/drm/drm_module.h:69 [inline] bochs_pci_driver_init+0x67/0x80 drivers/gpu/drm/tiny/bochs.c:805 do_one_initcall+0x128/0x700 init/main.c:1257 do_initcall_level init/main.c:1319 [inline] do_initcalls init/main.c:1335 [inline] do_basic_setup init/main.c:1354 [inline] kernel_init_freeable+0x5c7/0x900 init/main.c:1568 kernel_init+0x1c/0x2b0 init/main.c:1457 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:148 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: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_user_str kernel/trace/bpf_trace.c:224 [inline] bpf_probe_read_user_str+0x26/0x70 kernel/trace/bpf_trace.c:221 bpf_prog_bc7c5c6b9645592f+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 __schedule_loop kernel/sched/core.c:6842 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6857 synchronize_rcu_expedited+0x392/0x450 kernel/rcu/tree_exp.h:1011 lru_cache_disable+0x26/0x30 mm/swap.c:918 do_pages_move mm/migrate.c:2325 [inline] kernel_move_pages+0x287/0x1560 mm/migrate.c:2579 __do_sys_move_pages mm/migrate.c:2593 [inline] __se_sys_move_pages mm/migrate.c:2588 [inline] __ia32_sys_move_pages+0xdd/0x1b0 mm/migrate.c:2588 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e 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 *** 3 locks held by syz.3.724/8489: #0: ffffffff8e1c85b8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock+0x282/0x3b0 kernel/rcu/tree_exp.h:302 #1: ffff88802b63ed58 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 #2: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #2: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2370 [inline] #2: ffffffff8e1bd140 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run4+0x1d6/0x5a0 kernel/trace/bpf_trace.c:2414 stack backtrace: CPU: 2 UID: 0 PID: 8489 Comm: syz.3.724 Not tainted 6.14.0-rc6-syzkaller-00016-g0fed89a961ea #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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_user_str kernel/trace/bpf_trace.c:224 [inline] bpf_probe_read_user_str+0x26/0x70 kernel/trace/bpf_trace.c:221 bpf_prog_bc7c5c6b9645592f+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 __schedule_loop kernel/sched/core.c:6842 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6857 synchronize_rcu_expedited+0x392/0x450 kernel/rcu/tree_exp.h:1011 lru_cache_disable+0x26/0x30 mm/swap.c:918 do_pages_move mm/migrate.c:2325 [inline] kernel_move_pages+0x287/0x1560 mm/migrate.c:2579 __do_sys_move_pages mm/migrate.c:2593 [inline] __se_sys_move_pages mm/migrate.c:2588 [inline] __ia32_sys_move_pages+0xdd/0x1b0 mm/migrate.c:2588 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf73ee579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f507655c EFLAGS: 00000296 ORIG_RAX: 000000000000013d RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000000020a0 RDX: 0000000080000040 RSI: 0000000080001180 RDI: 0000000080000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 CPU: 2 UID: 0 PID: 8489 Comm: syz.3.724 Not tainted 6.14.0-rc6-syzkaller-00016-g0fed89a961ea #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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_user_str kernel/trace/bpf_trace.c:224 [inline] bpf_probe_read_user_str+0x26/0x70 kernel/trace/bpf_trace.c:221 bpf_prog_bc7c5c6b9645592f+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 __schedule_loop kernel/sched/core.c:6842 [inline] schedule+0xe7/0x350 kernel/sched/core.c:6857 synchronize_rcu_expedited+0x392/0x450 kernel/rcu/tree_exp.h:1011 lru_cache_disable+0x26/0x30 mm/swap.c:918 do_pages_move mm/migrate.c:2325 [inline] kernel_move_pages+0x287/0x1560 mm/migrate.c:2579 __do_sys_move_pages mm/migrate.c:2593 [inline] __se_sys_move_pages mm/migrate.c:2588 [inline] __ia32_sys_move_pages+0xdd/0x1b0 mm/migrate.c:2588 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf73ee579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f507655c EFLAGS: 00000296 ORIG_RAX: 000000000000013d RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00000000000020a0 RDX: 0000000080000040 RSI: 0000000080001180 RDI: 0000000080000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi