Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.218' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 67.502477][ T6554] [ 67.504871][ T6554] ====================================================== [ 67.513258][ T6554] WARNING: possible circular locking dependency detected [ 67.520490][ T6554] 5.15.0-rc5-next-20211015-syzkaller #0 Not tainted [ 67.527079][ T6554] ------------------------------------------------------ [ 67.534081][ T6554] syz-executor097/6554 is trying to acquire lock: [ 67.540874][ T6554] ffffffff8ba2e370 (cpu_hotplug_lock){++++}-{0:0}, at: wake_up_all_idle_cpus+0x13/0x80 [ 67.550566][ T6554] [ 67.550566][ T6554] but task is already holding lock: [ 67.557907][ T6554] ffff888079003228 (&mm->mmap_lock#2){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x290 [ 67.567253][ T6554] [ 67.567253][ T6554] which lock already depends on the new lock. [ 67.567253][ T6554] [ 67.577737][ T6554] [ 67.577737][ T6554] the existing dependency chain (in reverse order) is: [ 67.586736][ T6554] [ 67.586736][ T6554] -> #3 (&mm->mmap_lock#2){++++}-{3:3}: [ 67.594461][ T6554] __might_fault+0x104/0x170 [ 67.599564][ T6554] _copy_from_user+0x27/0x180 [ 67.604785][ T6554] memdup_user+0x69/0xc0 [ 67.609534][ T6554] strndup_user+0x70/0xe0 [ 67.614379][ T6554] _perf_ioctl+0x1a2/0x1f00 [ 67.619574][ T6554] perf_ioctl+0x76/0xb0 [ 67.624245][ T6554] __x64_sys_ioctl+0x193/0x200 [ 67.629538][ T6554] do_syscall_64+0x35/0xb0 [ 67.634479][ T6554] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 67.640891][ T6554] [ 67.640891][ T6554] -> #2 (&cpuctx_mutex){+.+.}-{3:3}: [ 67.648360][ T6554] __mutex_lock+0x12f/0x12f0 [ 67.653580][ T6554] perf_event_init_cpu+0x172/0x3e0 [ 67.659548][ T6554] perf_event_init+0x39d/0x408 [ 67.665003][ T6554] start_kernel+0x2bb/0x49b [ 67.670013][ T6554] secondary_startup_64_no_verify+0xb0/0xbb [ 67.676606][ T6554] [ 67.676606][ T6554] -> #1 (pmus_lock){+.+.}-{3:3}: [ 67.683734][ T6554] __mutex_lock+0x12f/0x12f0 [ 67.689005][ T6554] perf_event_init_cpu+0xc4/0x3e0 [ 67.694543][ T6554] cpuhp_invoke_callback+0x3b5/0x9a0 [ 67.700518][ T6554] _cpu_up+0x3b0/0x790 [ 67.705096][ T6554] cpu_up+0xfe/0x1a0 [ 67.709497][ T6554] bringup_nonboot_cpus+0xfe/0x130 [ 67.715301][ T6554] smp_init+0x2e/0x145 [ 67.720310][ T6554] kernel_init_freeable+0x477/0x73a [ 67.726019][ T6554] kernel_init+0x1a/0x1d0 [ 67.730860][ T6554] ret_from_fork+0x1f/0x30 [ 67.735796][ T6554] [ 67.735796][ T6554] -> #0 (cpu_hotplug_lock){++++}-{0:0}: [ 67.743510][ T6554] __lock_acquire+0x2a07/0x54a0 [ 67.748871][ T6554] lock_acquire+0x1ab/0x510 [ 67.753882][ T6554] cpus_read_lock+0x3e/0x140 [ 67.758975][ T6554] wake_up_all_idle_cpus+0x13/0x80 [ 67.764613][ T6554] cpu_latency_qos_remove_request.part.0+0xc4/0x2f0 [ 67.771711][ T6554] cpu_latency_qos_remove_request+0x65/0x80 [ 67.778113][ T6554] snd_pcm_hw_params+0x1481/0x1990 [ 67.783749][ T6554] snd_pcm_kernel_ioctl+0x164/0x310 [ 67.789454][ T6554] snd_pcm_oss_change_params_locked+0x1936/0x3a60 [ 67.796376][ T6554] snd_pcm_oss_mmap+0x442/0x550 [ 67.801836][ T6554] mmap_region+0xd8c/0x1650 [ 67.806935][ T6554] do_mmap+0x869/0xfb0 [ 67.811513][ T6554] vm_mmap_pgoff+0x1b7/0x290 [ 67.816719][ T6554] ksys_mmap_pgoff+0x49f/0x620 [ 67.821990][ T6554] do_syscall_64+0x35/0xb0 [ 67.826923][ T6554] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 67.833360][ T6554] [ 67.833360][ T6554] other info that might help us debug this: [ 67.833360][ T6554] [ 67.843578][ T6554] Chain exists of: [ 67.843578][ T6554] cpu_hotplug_lock --> &cpuctx_mutex --> &mm->mmap_lock#2 [ 67.843578][ T6554] [ 67.856609][ T6554] Possible unsafe locking scenario: [ 67.856609][ T6554] [ 67.864050][ T6554] CPU0 CPU1 [ 67.869452][ T6554] ---- ---- [ 67.874798][ T6554] lock(&mm->mmap_lock#2); [ 67.879292][ T6554] lock(&cpuctx_mutex); [ 67.886056][ T6554] lock(&mm->mmap_lock#2); [ 67.893074][ T6554] lock(cpu_hotplug_lock); [ 67.897565][ T6554] [ 67.897565][ T6554] *** DEADLOCK *** [ 67.897565][ T6554] [ 67.905698][ T6554] 2 locks held by syz-executor097/6554: [ 67.911311][ T6554] #0: ffff888079003228 (&mm->mmap_lock#2){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x290 [ 67.920889][ T6554] #1: ffff88802317a440 (&runtime->oss.params_lock){+.+.}-{3:3}, at: snd_pcm_oss_mmap+0x424/0x550 [ 67.931487][ T6554] [ 67.931487][ T6554] stack backtrace: [ 67.937360][ T6554] CPU: 0 PID: 6554 Comm: syz-executor097 Not tainted 5.15.0-rc5-next-20211015-syzkaller #0 [ 67.947317][ T6554] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 67.957353][ T6554] Call Trace: [ 67.960618][ T6554] [ 67.963535][ T6554] dump_stack_lvl+0xcd/0x134 [ 67.968119][ T6554] check_noncircular+0x25f/0x2e0 [ 67.973049][ T6554] ? print_circular_bug+0x1e0/0x1e0 [ 67.978239][ T6554] ? lockdep_lock+0xc6/0x200 [ 67.982881][ T6554] ? call_rcu_zapped+0xb0/0xb0 [ 67.987646][ T6554] __lock_acquire+0x2a07/0x54a0 [ 67.992491][ T6554] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 67.998465][ T6554] lock_acquire+0x1ab/0x510 [ 68.002959][ T6554] ? wake_up_all_idle_cpus+0x13/0x80 [ 68.008234][ T6554] ? lock_release+0x720/0x720 [ 68.012904][ T6554] cpus_read_lock+0x3e/0x140 [ 68.017484][ T6554] ? wake_up_all_idle_cpus+0x13/0x80 [ 68.022772][ T6554] wake_up_all_idle_cpus+0x13/0x80 [ 68.027887][ T6554] cpu_latency_qos_remove_request.part.0+0xc4/0x2f0 [ 68.034571][ T6554] cpu_latency_qos_remove_request+0x65/0x80 [ 68.040455][ T6554] snd_pcm_hw_params+0x1481/0x1990 [ 68.045571][ T6554] ? snd_pcm_capture_open+0x140/0x140 [ 68.051033][ T6554] ? mark_held_locks+0x9f/0xe0 [ 68.055786][ T6554] ? _raw_spin_unlock_irq+0x1f/0x40 [ 68.060990][ T6554] ? lockdep_hardirqs_on+0x79/0x100 [ 68.066185][ T6554] snd_pcm_kernel_ioctl+0x164/0x310 [ 68.071369][ T6554] snd_pcm_oss_change_params_locked+0x1936/0x3a60 [ 68.077952][ T6554] ? snd_pcm_plugin_append+0x190/0x190 [ 68.083409][ T6554] ? mutex_trylock+0x2f0/0x370 [ 68.088345][ T6554] ? snd_pcm_oss_mmap+0x424/0x550 [ 68.093361][ T6554] snd_pcm_oss_mmap+0x442/0x550 [ 68.098210][ T6554] mmap_region+0xd8c/0x1650 [ 68.102711][ T6554] do_mmap+0x869/0xfb0 [ 68.106781][ T6554] vm_mmap_pgoff+0x1b7/0x290 [ 68.111362][ T6554] ? randomize_stack_top+0x100/0x100 [ 68.116740][ T6554] ? __fget_files+0x23d/0x3e0 [ 68.121408][ T6554] ksys_mmap_pgoff+0x49f/0x620 [ 68.126266][ T6554] ? mlock_future_check+0x120/0x120 [ 68.131555][ T6554] ? syscall_enter_from_user_mode+0x21/0x70 [ 68.137442][ T6554] do_syscall_64+0x35/0xb0 [ 68.141933][ T6554] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 68.147819][ T6554] RIP: 0033:0x7fc0cb6221c9 [ 68.152238][ T6554] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 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 c0 ff ff ff f7 d8 64 89 01 48 [ 68.171930][ T6554] RSP: 002b:00007fffcd48ab28 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 68.180339][ T6554] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc0cb6221c9 [ 68.188296][ T6554] RDX: 0000000001800003 RSI: 0000000000800000 RDI: 0000000020000000 [ 68.196250][ T6554] RBP: 00007fc0cb5e61b0 R08: 0000000000000004 R09: 0000000000000000 [ 68.204301]