[ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.21' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 26.810384] [ 26.812008] ====================================================== [ 26.818295] WARNING: possible circular locking dependency detected [ 26.824583] 4.14.300-syzkaller #0 Not tainted [ 26.829050] ------------------------------------------------------ [ 26.835339] syz-executor331/7979 is trying to acquire lock: [ 26.841014] (event_mutex){+.+.}, at: [] ftrace_profile_set_filter+0x64/0x1c0 [ 26.849915] [ 26.849915] but task is already holding lock: [ 26.855863] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 [ 26.865194] [ 26.865194] which lock already depends on the new lock. [ 26.865194] [ 26.873494] [ 26.873494] the existing dependency chain (in reverse order) is: [ 26.881083] [ 26.881083] -> #4 (&cpuctx_mutex){+.+.}: [ 26.886603] __mutex_lock+0xc4/0x1310 [ 26.890899] perf_event_init_cpu+0xb7/0x170 [ 26.895711] perf_event_init+0x2cc/0x308 [ 26.900261] start_kernel+0x45d/0x763 [ 26.904553] secondary_startup_64+0xa5/0xb0 [ 26.909361] [ 26.909361] -> #3 (pmus_lock){+.+.}: [ 26.914532] __mutex_lock+0xc4/0x1310 [ 26.918822] perf_event_init_cpu+0x2c/0x170 [ 26.923634] cpuhp_invoke_callback+0x1e6/0x1a80 [ 26.928793] _cpu_up+0x21e/0x520 [ 26.932647] do_cpu_up+0x9a/0x160 [ 26.936592] smp_init+0x197/0x1ac [ 26.940538] kernel_init_freeable+0x406/0x626 [ 26.945522] kernel_init+0xd/0x167 [ 26.949552] ret_from_fork+0x24/0x30 [ 26.953752] [ 26.953752] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 26.960130] cpus_read_lock+0x39/0xc0 [ 26.964507] static_key_slow_inc+0xe/0x20 [ 26.969145] tracepoint_add_func+0x747/0xa40 [ 26.974044] tracepoint_probe_register+0x8c/0xc0 [ 26.979296] trace_event_reg+0x272/0x330 [ 26.983848] perf_trace_init+0x424/0xa30 [ 26.988401] perf_tp_event_init+0x79/0xf0 [ 26.993040] perf_try_init_event+0x15b/0x1f0 [ 26.997949] perf_event_alloc.part.0+0xe2d/0x2640 [ 27.003281] SyS_perf_event_open+0x683/0x2530 [ 27.008265] do_syscall_64+0x1d5/0x640 [ 27.012644] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.018322] [ 27.018322] -> #1 (tracepoints_mutex){+.+.}: [ 27.024180] __mutex_lock+0xc4/0x1310 [ 27.028472] tracepoint_probe_register+0x68/0xc0 [ 27.033723] trace_event_reg+0x272/0x330 [ 27.038275] perf_trace_init+0x424/0xa30 [ 27.042825] perf_tp_event_init+0x79/0xf0 [ 27.047467] perf_try_init_event+0x15b/0x1f0 [ 27.052365] perf_event_alloc.part.0+0xe2d/0x2640 [ 27.057699] SyS_perf_event_open+0x683/0x2530 [ 27.062686] do_syscall_64+0x1d5/0x640 [ 27.067062] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.072740] [ 27.072740] -> #0 (event_mutex){+.+.}: [ 27.078082] lock_acquire+0x170/0x3f0 [ 27.082372] __mutex_lock+0xc4/0x1310 [ 27.086662] ftrace_profile_set_filter+0x64/0x1c0 [ 27.091996] _perf_ioctl+0x12b3/0x1a60 [ 27.096376] perf_ioctl+0x55/0x80 [ 27.100319] do_vfs_ioctl+0x75a/0xff0 [ 27.104615] SyS_ioctl+0x7f/0xb0 [ 27.108482] do_syscall_64+0x1d5/0x640 [ 27.112863] entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.118538] [ 27.118538] other info that might help us debug this: [ 27.118538] [ 27.126681] Chain exists of: [ 27.126681] event_mutex --> pmus_lock --> &cpuctx_mutex [ 27.126681] [ 27.136537] Possible unsafe locking scenario: [ 27.136537] [ 27.142570] CPU0 CPU1 [ 27.147202] ---- ---- [ 27.151836] lock(&cpuctx_mutex); [ 27.155346] lock(pmus_lock); [ 27.161027] lock(&cpuctx_mutex); [ 27.167053] lock(event_mutex); [ 27.170391] [ 27.170391] *** DEADLOCK *** [ 27.170391] [ 27.176418] 1 lock held by syz-executor331/7979: [ 27.181139] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 [ 27.190733] [ 27.190733] stack backtrace: [ 27.195201] CPU: 1 PID: 7979 Comm: syz-executor331 Not tainted 4.14.300-syzkaller #0 [ 27.203049] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 27.212460] Call Trace: [ 27.215032] dump_stack+0x1b2/0x281 [ 27.218631] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 27.224403] __lock_acquire+0x2e0e/0x3f20 [ 27.228523] ? trace_hardirqs_on+0x10/0x10 [ 27.232731] ? entry_SYSCALL_64_after_hwframe+0x5e/0xd3 [ 27.238063] ? save_trace+0xd6/0x290 [ 27.241749] lock_acquire+0x170/0x3f0 [ 27.245526] ? ftrace_profile_set_filter+0x64/0x1c0 [ 27.250514] ? ftrace_profile_set_filter+0x64/0x1c0 [ 27.256815] __mutex_lock+0xc4/0x1310 [ 27.260678] ? ftrace_profile_set_filter+0x64/0x1c0 [ 27.265671] ? trace_hardirqs_on+0x10/0x10 [ 27.269893] ? __lock_acquire+0x5fc/0x3f20 [ 27.274125] ? ftrace_profile_set_filter+0x64/0x1c0 [ 27.279122] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.284544] ? __might_fault+0x104/0x1b0 [ 27.288764] ? lock_acquire+0x170/0x3f0 [ 27.292709] ? lock_downgrade+0x740/0x740 [ 27.296831] ftrace_profile_set_filter+0x64/0x1c0 [ 27.301646] ? ftrace_profile_free_filter+0x60/0x60 [ 27.306635] ? memdup_user+0x54/0xa0 [ 27.310320] _perf_ioctl+0x12b3/0x1a60 [ 27.314186] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 27.319692] ? lock_downgrade+0x740/0x740 [ 27.323809] ? perf_event_set_output+0x510/0x510 [ 27.328603] ? lock_acquire+0x170/0x3f0 [ 27.332554] ? lock_downgrade+0x740/0x740 [ 27.336672] ? perf_event_ctx_lock_nested+0x247/0x2c0 [ 27.341828] ? _perf_ioctl+0x1a60/0x1a60 [ 27.345947] perf_ioctl+0x55/0x80 [ 27.349384] do_vfs_ioctl+0x75a/0xff0 [ 27.353156] ? ioctl_preallocate+0x1a0/0x1a0 [ 27.357539] ? perf_bp_event+0x170/0x170 [ 27.361571]