------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 6.11.0-syzkaller-10669-g11a299a7933e #0 Not tainted ------------------------------------------------------ syz.5.26/5406 is trying to acquire lock: ffffffff8e813558 ((console_sem).lock){-...}-{2:2}, at: down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 but task is already holding lock: ffff88801fc3ea98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:593 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:593 raw_spin_rq_lock kernel/sched/sched.h:1505 [inline] task_rq_lock+0xc6/0x360 kernel/sched/core.c:695 cgroup_move_task+0x92/0x2d0 kernel/sched/psi.c:1161 css_set_move_task+0x72e/0x950 kernel/cgroup/cgroup.c:898 cgroup_post_fork+0x256/0x880 kernel/cgroup/cgroup.c:6692 copy_process+0x39e9/0x3d50 kernel/fork.c:2601 kernel_clone+0x226/0x8f0 kernel/fork.c:2787 user_mode_thread+0x132/0x1a0 kernel/fork.c:2865 rest_init+0x23/0x300 init/main.c:712 start_kernel+0x47f/0x500 init/main.c:1105 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/0x1480 kernel/sched/core.c:4154 up+0x72/0x90 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:343 [inline] __console_unlock+0x123/0x1f0 kernel/printk/printk.c:2844 __console_flush_and_unlock kernel/printk/printk.c:3241 [inline] console_unlock+0x18f/0x3b0 kernel/printk/printk.c:3279 vga_remove_vgacon+0xbe/0xd0 drivers/pci/vgaarb.c:186 virtio_gpu_pci_quirk drivers/gpu/drm/virtio/virtgpu_drv.c:61 [inline] virtio_gpu_probe+0x347/0x3c0 drivers/gpu/drm/virtio/virtgpu_drv.c:92 virtio_dev_probe+0x931/0xc80 drivers/virtio/virtio.c:341 really_probe+0x2b8/0xad0 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800 driver_probe_device+0x50/0x430 drivers/base/dd.c:830 __driver_attach+0x45f/0x710 drivers/base/dd.c:1216 bus_for_each_dev+0x239/0x2b0 drivers/base/bus.c:368 bus_add_driver+0x346/0x670 drivers/base/bus.c:673 driver_register+0x23a/0x320 drivers/base/driver.c:246 do_one_initcall+0x248/0x880 init/main.c:1269 do_initcall_level+0x157/0x210 init/main.c:1331 do_initcalls+0x3f/0x80 init/main.c:1347 kernel_init_freeable+0x435/0x5d0 init/main.c:1580 kernel_init+0x1d/0x2b0 init/main.c:1469 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 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:326 console_trylock kernel/printk/printk.c:2827 [inline] console_trylock_spinning kernel/printk/printk.c:1990 [inline] vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2406 _printk+0xd5/0x120 kernel/printk/printk.c:2432 __report_bug lib/bug.c:195 [inline] report_bug+0x346/0x500 lib/bug.c:219 handle_bug+0x60/0x90 arch/x86/kernel/traps.c:285 exc_invalid_op+0x1a/0x50 arch/x86/kernel/traps.c:309 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 cpu_max_bits_warn include/linux/cpumask.h:135 [inline] cpumask_check include/linux/cpumask.h:142 [inline] cpumask_clear_cpu include/linux/cpumask.h:529 [inline] __mm_cid_put kernel/sched/sched.h:3542 [inline] mm_cid_put_lazy kernel/sched/sched.h:3564 [inline] switch_mm_cid kernel/sched/sched.h:3754 [inline] context_switch kernel/sched/core.c:5310 [inline] __schedule+0x1aeb/0x4b30 kernel/sched/core.c:6675 __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6767 exit_to_user_mode_loop kernel/entry/common.c:102 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0xe7/0x280 kernel/entry/common.c:231 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 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 *** 1 lock held by syz.5.26/5406: #0: ffff88801fc3ea98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:593 stack backtrace: CPU: 0 UID: 0 PID: 5406 Comm: syz.5.26 Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #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+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:326 console_trylock kernel/printk/printk.c:2827 [inline] console_trylock_spinning kernel/printk/printk.c:1990 [inline] vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2406 _printk+0xd5/0x120 kernel/printk/printk.c:2432 __report_bug lib/bug.c:195 [inline] report_bug+0x346/0x500 lib/bug.c:219 handle_bug+0x60/0x90 arch/x86/kernel/traps.c:285 exc_invalid_op+0x1a/0x50 arch/x86/kernel/traps.c:309 asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621 RIP: 0010:cpu_max_bits_warn include/linux/cpumask.h:135 [inline] RIP: 0010:cpumask_check include/linux/cpumask.h:142 [inline] RIP: 0010:cpumask_clear_cpu include/linux/cpumask.h:529 [inline] RIP: 0010:__mm_cid_put kernel/sched/sched.h:3542 [inline] RIP: 0010:mm_cid_put_lazy kernel/sched/sched.h:3564 [inline] RIP: 0010:switch_mm_cid kernel/sched/sched.h:3754 [inline] RIP: 0010:context_switch kernel/sched/core.c:5310 [inline] RIP: 0010:__schedule+0x1aeb/0x4b30 kernel/sched/core.c:6675 Code: ff ff 90 0f 0b 90 e9 d4 f9 ff ff c6 05 af 73 3a 04 01 90 48 c7 c7 a0 76 0a 8c e8 70 78 89 f5 90 0f 0b 90 90 e9 12 ef ff ff 90 <0f> 0b 90 e9 8a fb ff ff 90 0f 0b 90 e9 bf f2 ff ff ba 19 00 00 00 RSP: 0000:ffffc90002a8fd00 EFLAGS: 00010016 RAX: 0000000000000004 RBX: 0000000000000014 RCX: 0000000002a8fe03 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90002a8fe40 RBP: ffffc90002a8fee8 R08: 0000000000000003 R09: fffff52000551fc8 R10: dffffc0000000000 R11: fffff52000551fc8 R12: 0000607fe0087b60 R13: 1ffff92000551fc8 R14: ffff8880123c9248 R15: ffffc90002a8fe40 __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6767 exit_to_user_mode_loop kernel/entry/common.c:102 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0xe7/0x280 kernel/entry/common.c:231 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7f88e2641cf6 Code: f0 72 6e 48 63 cd 48 01 c1 49 39 4f 08 72 4c 8d 4d ff 85 ed 74 33 66 0f 1f 44 00 00 48 39 f0 72 1b 4d 8b 07 49 89 c1 49 29 f1 <47> 0f b6 0c 08 45 84 c9 74 08 45 88 0c 00 49 8b 47 10 48 83 c0 01 RSP: 002b:00007f88e36534a0 EFLAGS: 00010206 RAX: 00000000005ac001 RBX: 00007f88e3653540 RCX: 0000000000000033 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00007f88e36535e0 RBP: 0000000000000102 R08: 00007f88d9400000 R09: 00000000005ac000 R10: 0000000000000000 R11: 00007f88e3653550 R12: 0000000000000001 R13: 00007f88e2804900 R14: 0000000000000000 R15: 00007f88e36535e0 WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 cpu_max_bits_warn include/linux/cpumask.h:135 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 cpumask_check include/linux/cpumask.h:142 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 cpumask_clear_cpu include/linux/cpumask.h:529 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 __mm_cid_put kernel/sched/sched.h:3542 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 mm_cid_put_lazy kernel/sched/sched.h:3564 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 switch_mm_cid kernel/sched/sched.h:3754 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 context_switch kernel/sched/core.c:5310 [inline] WARNING: CPU: 0 PID: 5406 at include/linux/cpumask.h:135 __schedule+0x1aeb/0x4b30 kernel/sched/core.c:6675 Modules linked in: CPU: 0 UID: 0 PID: 5406 Comm: syz.5.26 Not tainted 6.11.0-syzkaller-10669-g11a299a7933e #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:cpu_max_bits_warn include/linux/cpumask.h:135 [inline] RIP: 0010:cpumask_check include/linux/cpumask.h:142 [inline] RIP: 0010:cpumask_clear_cpu include/linux/cpumask.h:529 [inline] RIP: 0010:__mm_cid_put kernel/sched/sched.h:3542 [inline] RIP: 0010:mm_cid_put_lazy kernel/sched/sched.h:3564 [inline] RIP: 0010:switch_mm_cid kernel/sched/sched.h:3754 [inline] RIP: 0010:context_switch kernel/sched/core.c:5310 [inline] RIP: 0010:__schedule+0x1aeb/0x4b30 kernel/sched/core.c:6675 Code: ff ff 90 0f 0b 90 e9 d4 f9 ff ff c6 05 af 73 3a 04 01 90 48 c7 c7 a0 76 0a 8c e8 70 78 89 f5 90 0f 0b 90 90 e9 12 ef ff ff 90 <0f> 0b 90 e9 8a fb ff ff 90 0f 0b 90 e9 bf f2 ff ff ba 19 00 00 00 RSP: 0000:ffffc90002a8fd00 EFLAGS: 00010016 RAX: 0000000000000004 RBX: 0000000000000014 RCX: 0000000002a8fe03 RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90002a8fe40 RBP: ffffc90002a8fee8 R08: 0000000000000003 R09: fffff52000551fc8 R10: dffffc0000000000 R11: fffff52000551fc8 R12: 0000607fe0087b60 R13: 1ffff92000551fc8 R14: ffff8880123c9248 R15: ffffc90002a8fe40 FS: 00007f88e36546c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f88d99ac000 CR3: 0000000052f28000 CR4: 0000000000350ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __schedule_loop kernel/sched/core.c:6752 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6767 exit_to_user_mode_loop kernel/entry/common.c:102 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0xe7/0x280 kernel/entry/common.c:231 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7f88e2641cf6 Code: f0 72 6e 48 63 cd 48 01 c1 49 39 4f 08 72 4c 8d 4d ff 85 ed 74 33 66 0f 1f 44 00 00 48 39 f0 72 1b 4d 8b 07 49 89 c1 49 29 f1 <47> 0f b6 0c 08 45 84 c9 74 08 45 88 0c 00 49 8b 47 10 48 83 c0 01 RSP: 002b:00007f88e36534a0 EFLAGS: 00010206 RAX: 00000000005ac001 RBX: 00007f88e3653540 RCX: 0000000000000033 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00007f88e36535e0 RBP: 0000000000000102 R08: 00007f88d9400000 R09: 00000000005ac000 R10: 0000000000000000 R11: 00007f88e3653550 R12: 0000000000000001 R13: 00007f88e2804900 R14: 0000000000000000 R15: 00007f88e36535e0