[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.1.43' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 31.916323] IPVS: ftp: loaded support on port[0] = 21 executing program executing program executing program [ 32.032278] [ 32.033949] ====================================================== [ 32.040360] WARNING: possible circular locking dependency detected [ 32.046826] 4.14.216-syzkaller #0 Not tainted [ 32.051310] ------------------------------------------------------ [ 32.057622] syz-executor858/8018 is trying to acquire lock: [ 32.063320] (&event->child_mutex){+.+.}, at: [] perf_event_for_each_child+0x82/0x140 [ 32.073105] [ 32.073105] but task is already holding lock: [ 32.079067] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 [ 32.088242] [ 32.088242] which lock already depends on the new lock. [ 32.088242] [ 32.096548] [ 32.096548] the existing dependency chain (in reverse order) is: [ 32.104258] [ 32.104258] -> #5 (&cpuctx_mutex){+.+.}: [ 32.109813] __mutex_lock+0xc4/0x1310 [ 32.114185] perf_event_init_cpu+0xb7/0x170 [ 32.119038] perf_event_init+0x2cc/0x308 [ 32.123626] start_kernel+0x46a/0x770 [ 32.127940] secondary_startup_64+0xa5/0xb0 [ 32.132779] [ 32.132779] -> #4 (pmus_lock){+.+.}: [ 32.137980] __mutex_lock+0xc4/0x1310 [ 32.142298] perf_event_init_cpu+0x2c/0x170 [ 32.147123] cpuhp_invoke_callback+0x1e6/0x1a80 [ 32.152311] _cpu_up+0x219/0x500 [ 32.156269] do_cpu_up+0x9a/0x160 [ 32.160367] smp_init+0x197/0x1ac [ 32.164372] kernel_init_freeable+0x3f4/0x614 [ 32.169377] kernel_init+0xd/0x166 [ 32.173427] ret_from_fork+0x24/0x30 [ 32.177638] [ 32.177638] -> #3 (cpu_hotplug_lock.rw_sem){++++}: [ 32.184054] cpus_read_lock+0x39/0xc0 [ 32.188355] static_key_slow_inc+0xe/0x20 [ 32.193004] tracepoint_add_func+0x517/0x750 [ 32.197914] tracepoint_probe_register+0x8c/0xc0 [ 32.203184] trace_event_reg+0x272/0x330 [ 32.207758] perf_trace_init+0x424/0xa30 [ 32.212340] perf_tp_event_init+0x79/0xf0 [ 32.217013] perf_try_init_event+0x15b/0x1f0 [ 32.221942] perf_event_alloc.part.0+0xe2d/0x2640 [ 32.227314] SyS_perf_event_open+0x67f/0x24b0 [ 32.232314] do_syscall_64+0x1d5/0x640 [ 32.236714] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.242435] [ 32.242435] -> #2 (tracepoints_mutex){+.+.}: [ 32.248314] __mutex_lock+0xc4/0x1310 [ 32.252624] tracepoint_probe_register+0x68/0xc0 [ 32.257898] trace_event_reg+0x272/0x330 [ 32.262490] perf_trace_init+0x424/0xa30 [ 32.267070] perf_tp_event_init+0x79/0xf0 [ 32.272676] perf_try_init_event+0x15b/0x1f0 [ 32.277696] perf_event_alloc.part.0+0xe2d/0x2640 [ 32.283052] SyS_perf_event_open+0x67f/0x24b0 [ 32.288084] do_syscall_64+0x1d5/0x640 [ 32.292494] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.298196] [ 32.298196] -> #1 (event_mutex){+.+.}: [ 32.303655] __mutex_lock+0xc4/0x1310 [ 32.307955] perf_trace_destroy+0x23/0xf0 [ 32.312618] _free_event+0x321/0xe20 [ 32.316846] free_event+0x32/0x40 [ 32.320812] perf_event_release_kernel+0x368/0x8a0 [ 32.326266] perf_release+0x33/0x40 [ 32.330401] __fput+0x25f/0x7a0 [ 32.334213] task_work_run+0x11f/0x190 [ 32.338607] do_exit+0xa44/0x2850 [ 32.342588] do_group_exit+0x100/0x2e0 [ 32.347160] get_signal+0x38d/0x1ca0 [ 32.351399] do_signal+0x7c/0x1550 [ 32.355444] exit_to_usermode_loop+0x160/0x200 [ 32.360548] do_syscall_64+0x4a3/0x640 [ 32.365237] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.371037] [ 32.371037] -> #0 (&event->child_mutex){+.+.}: [ 32.377124] lock_acquire+0x170/0x3f0 [ 32.381440] __mutex_lock+0xc4/0x1310 [ 32.385747] perf_event_for_each_child+0x82/0x140 [ 32.391208] _perf_ioctl+0x3db/0x1a40 [ 32.395530] perf_ioctl+0x55/0x80 [ 32.399516] do_vfs_ioctl+0x75a/0xff0 [ 32.403848] SyS_ioctl+0x7f/0xb0 [ 32.407933] do_syscall_64+0x1d5/0x640 [ 32.412339] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.418036] [ 32.418036] other info that might help us debug this: [ 32.418036] [ 32.426213] Chain exists of: [ 32.426213] &event->child_mutex --> pmus_lock --> &cpuctx_mutex [ 32.426213] [ 32.436779] Possible unsafe locking scenario: [ 32.436779] [ 32.442817] CPU0 CPU1 [ 32.447465] ---- ---- [ 32.452267] lock(&cpuctx_mutex); [ 32.455804] lock(pmus_lock); [ 32.461638] lock(&cpuctx_mutex); [ 32.467693] lock(&event->child_mutex); [ 32.471783] [ 32.471783] *** DEADLOCK *** [ 32.471783] [ 32.477861] 1 lock held by syz-executor858/8018: [ 32.482609] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 [ 32.492410] [ 32.492410] stack backtrace: [ 32.496903] CPU: 0 PID: 8018 Comm: syz-executor858 Not tainted 4.14.216-syzkaller #0 [ 32.504848] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 32.514190] Call Trace: [ 32.516768] dump_stack+0x1b2/0x281 [ 32.520424] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 32.526377] __lock_acquire+0x2e0e/0x3f20 [ 32.530553] ? trace_hardirqs_on+0x10/0x10 [ 32.534786] lock_acquire+0x170/0x3f0 [ 32.538585] ? perf_event_for_each_child+0x82/0x140 [ 32.543591] ? perf_event_for_each_child+0x82/0x140 [ 32.548597] __mutex_lock+0xc4/0x1310 [ 32.552397] ? perf_event_for_each_child+0x82/0x140 [ 32.557405] ? perf_event_for_each_child+0x82/0x140 [ 32.563731] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 32.569188] ? lock_acquire+0x170/0x3f0 [ 32.573189] ? perf_event_ctx_lock_nested+0x14d/0x2c0 [ 32.578383] ? __perf_event_task_sched_out+0x11d0/0x11d0 [ 32.583833] perf_event_for_each_child+0x82/0x140 [ 32.588680] ? __perf_event_task_sched_out+0x11d0/0x11d0 [ 32.594122] _perf_ioctl+0x3db/0x1a40 [ 32.597925] ? perf_event_ctx_lock_nested+0x14d/0x2c0 [ 32.603118] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 32.608566] ? lock_downgrade+0x740/0x740 [ 32.612719] ? perf_event_set_output+0x450/0x450 [ 32.617478] ? lock_acquire+0x170/0x3f0 [ 32.621439] ? lock_downgrade+0x740/0x740 [ 32.625584] ? perf_event_ctx_lock_nested+0x247/0x2c0 [ 32.630771] ? _perf_ioctl+0x1a40/0x1a40 [ 32.634817] perf_ioctl+0x55/0x80 [ 32.638260] do_vfs_ioctl+0x75a/0xff0 [ 32.642084] ? ioctl_preallocate+0x1a0/0x1a0 [ 32.646491] ? lock_downgrade+0x740/0x740 [ 32.650623] ? __fget+0x225/0x360 [ 32.654064] ? do_vfs_ioctl+0xff0/0xff0 [ 32.658039] ? security_file_ioctl+0x83/0xb0 [ 32.662537] SyS_ioctl+0x7f/0xb0 [ 32.665890] ? do_vfs_ioctl+0xff0/0xff0 [ 32.670081] do_syscall_64+0x1d5/0x640 [ 32.673970] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 32.679174] RIP: 0033:0x44a8c9 executing program [ 32.682375] RSP: 002b:00007f24b291cdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 32.690092] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 000000000044a8c9 [ 32.697453] RDX: 0000000000000003 RSI: 0000000000002403 RDI: 0000000000000004 [ 32.704711] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 32.711969] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 32.719237] R13: 00007ffdf2e14cbf R14: 00007f24b291d9c0 R15: 0000000000000000 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program