Warning: Permanently added '10.128.0.194' (ECDSA) to the list of known hosts. [ 39.648922] random: sshd: uninitialized urandom read (32 bytes read) [ 39.769897] audit: type=1400 audit(1571328833.418:36): avc: denied { map } for pid=6901 comm="syz-executor049" path="/root/syz-executor049681636" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 40.040873] IPVS: ftp: loaded support on port[0] = 21 executing program executing program [ 40.951316] [ 40.952981] ====================================================== [ 40.959286] WARNING: possible circular locking dependency detected [ 40.965593] 4.14.149 #0 Not tainted [ 40.969209] ------------------------------------------------------ [ 40.975503] syz-executor049/6905 is trying to acquire lock: [ 40.981187] (&event->child_mutex){+.+.}, at: [] perf_read+0x2c0/0x820 [ 40.989399] [ 40.989399] but task is already holding lock: [ 40.995356] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x150/0x2c0 [ 41.004528] [ 41.004528] which lock already depends on the new lock. [ 41.004528] [ 41.012822] [ 41.012822] the existing dependency chain (in reverse order) is: [ 41.020417] [ 41.020417] -> #5 (&cpuctx_mutex){+.+.}: [ 41.025941] lock_acquire+0x16f/0x430 [ 41.030238] __mutex_lock+0xe8/0x1470 [ 41.034535] mutex_lock_nested+0x16/0x20 [ 41.039102] perf_event_init_cpu+0xc2/0x170 [ 41.043920] perf_event_init+0x2d8/0x31a [ 41.048488] start_kernel+0x3b6/0x6fd [ 41.052786] x86_64_start_reservations+0x29/0x2b [ 41.058036] x86_64_start_kernel+0x77/0x7b [ 41.062766] secondary_startup_64+0xa5/0xb0 [ 41.067581] [ 41.067581] -> #4 (pmus_lock){+.+.}: [ 41.072765] lock_acquire+0x16f/0x430 [ 41.077063] __mutex_lock+0xe8/0x1470 [ 41.081360] mutex_lock_nested+0x16/0x20 [ 41.085925] perf_event_init_cpu+0x2f/0x170 [ 41.090745] cpuhp_invoke_callback+0x1ea/0x1ab0 [ 41.095918] _cpu_up+0x228/0x530 [ 41.099779] do_cpu_up+0x121/0x150 [ 41.103816] cpu_up+0x1b/0x20 [ 41.107426] smp_init+0x157/0x170 [ 41.111377] kernel_init_freeable+0x30b/0x532 [ 41.116369] kernel_init+0x12/0x162 [ 41.120502] ret_from_fork+0x24/0x30 [ 41.124708] [ 41.124708] -> #3 (cpu_hotplug_lock.rw_sem){++++}: [ 41.131097] lock_acquire+0x16f/0x430 [ 41.135405] cpus_read_lock+0x3d/0xc0 [ 41.139704] static_key_slow_inc+0x13/0x30 [ 41.144442] tracepoint_probe_register_prio+0x4d6/0x6d0 [ 41.150474] tracepoint_probe_register+0x2b/0x40 [ 41.155724] trace_event_reg+0x277/0x330 [ 41.160279] perf_trace_init+0x449/0xaa0 [ 41.164837] perf_tp_event_init+0x7d/0xf0 [ 41.169480] perf_try_init_event+0x164/0x200 [ 41.174391] perf_event_alloc.part.0+0xd90/0x25b0 [ 41.179729] SYSC_perf_event_open+0xad1/0x2690 [ 41.184806] SyS_perf_event_open+0x34/0x40 [ 41.189539] do_syscall_64+0x1e8/0x640 [ 41.193922] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.199604] [ 41.199604] -> #2 (tracepoints_mutex){+.+.}: [ 41.205561] lock_acquire+0x16f/0x430 [ 41.209859] __mutex_lock+0xe8/0x1470 [ 41.214162] mutex_lock_nested+0x16/0x20 [ 41.218719] tracepoint_probe_register_prio+0x36/0x6d0 [ 41.224490] tracepoint_probe_register+0x2b/0x40 [ 41.229742] trace_event_reg+0x277/0x330 [ 41.234297] perf_trace_init+0x449/0xaa0 [ 41.238856] perf_tp_event_init+0x7d/0xf0 [ 41.243499] perf_try_init_event+0x164/0x200 [ 41.248404] perf_event_alloc.part.0+0xd90/0x25b0 [ 41.253740] SYSC_perf_event_open+0xad1/0x2690 [ 41.258816] SyS_perf_event_open+0x34/0x40 [ 41.263547] do_syscall_64+0x1e8/0x640 [ 41.267938] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.273620] [ 41.273620] -> #1 (event_mutex){+.+.}: [ 41.278965] lock_acquire+0x16f/0x430 [ 41.283268] __mutex_lock+0xe8/0x1470 [ 41.287563] mutex_lock_nested+0x16/0x20 [ 41.292208] perf_trace_destroy+0x28/0x100 [ 41.296937] tp_perf_event_destroy+0x16/0x20 [ 41.301840] _free_event+0x330/0xe70 [ 41.306047] free_event+0x38/0x50 [ 41.310000] perf_event_release_kernel+0x364/0x880 [ 41.315427] perf_release+0x37/0x50 [ 41.319551] __fput+0x275/0x7a0 [ 41.323326] ____fput+0x16/0x20 [ 41.327102] task_work_run+0x114/0x190 [ 41.331497] exit_to_usermode_loop+0x1da/0x220 [ 41.336576] do_syscall_64+0x4bc/0x640 [ 41.340959] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.346643] [ 41.346643] -> #0 (&event->child_mutex){+.+.}: [ 41.352686] __lock_acquire+0x2cb3/0x4620 [ 41.357329] lock_acquire+0x16f/0x430 [ 41.361638] __mutex_lock+0xe8/0x1470 [ 41.365949] mutex_lock_nested+0x16/0x20 [ 41.370509] perf_read+0x2c0/0x820 [ 41.374544] do_iter_read+0x3e2/0x5b0 [ 41.378850] vfs_readv+0xd3/0x130 [ 41.382799] do_readv+0x10a/0x2d0 [ 41.386748] SyS_readv+0x28/0x30 [ 41.390613] do_syscall_64+0x1e8/0x640 [ 41.394997] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.400679] [ 41.400679] other info that might help us debug this: [ 41.400679] [ 41.408814] Chain exists of: [ 41.408814] &event->child_mutex --> pmus_lock --> &cpuctx_mutex [ 41.408814] [ 41.419369] Possible unsafe locking scenario: [ 41.419369] [ 41.425400] CPU0 CPU1 [ 41.430039] ---- ---- [ 41.434680] lock(&cpuctx_mutex); [ 41.438193] lock(pmus_lock); [ 41.443885] lock(&cpuctx_mutex); [ 41.449930] lock(&event->child_mutex); [ 41.453966] [ 41.453966] *** DEADLOCK *** [ 41.453966] [ 41.460002] 1 lock held by syz-executor049/6905: [ 41.464740] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x150/0x2c0 [ 41.474353] [ 41.474353] stack backtrace: [ 41.478843] CPU: 1 PID: 6905 Comm: syz-executor049 Not tainted 4.14.149 #0 [ 41.485852] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 41.495219] Call Trace: [ 41.497800] dump_stack+0x138/0x197 [ 41.501849] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 41.507192] __lock_acquire+0x2cb3/0x4620 [ 41.511320] ? trace_hardirqs_on_caller+0x400/0x590 [ 41.516315] ? trace_hardirqs_on+0x10/0x10 [ 41.520528] ? save_stack+0xa9/0xd0 [ 41.524161] ? kasan_kmalloc+0xce/0xf0 [ 41.528024] ? __kmalloc+0x15d/0x7a0 [ 41.531713] ? perf_read+0x248/0x820 [ 41.535416] lock_acquire+0x16f/0x430 [ 41.539190] ? perf_read+0x2c0/0x820 [ 41.542888] ? perf_read+0x2c0/0x820 [ 41.546577] __mutex_lock+0xe8/0x1470 [ 41.550355] ? perf_read+0x2c0/0x820 [ 41.554043] ? save_trace+0x290/0x290 [ 41.557818] ? perf_read+0x2c0/0x820 [ 41.561506] ? __lock_is_held+0xb6/0x140 [ 41.565554] ? mutex_trylock+0x1c0/0x1c0 [ 41.569591] ? rcu_lockdep_current_cpu_online+0xf2/0x140 [ 41.575016] ? rcu_read_lock_sched_held+0x110/0x130 [ 41.580018] ? __kmalloc+0x376/0x7a0 [ 41.583709] ? __lock_is_held+0xb6/0x140 [ 41.587747] mutex_lock_nested+0x16/0x20 [ 41.591792] ? mutex_lock_nested+0x16/0x20 [ 41.596000] perf_read+0x2c0/0x820 [ 41.599524] ? __perf_read_group_add+0x680/0x680 [ 41.604428] ? selinux_file_permission+0x85/0x480 [ 41.609249] ? security_file_permission+0x89/0x1f0 [ 41.614155] ? rw_verify_area+0xea/0x2b0 [ 41.618193] do_iter_read+0x3e2/0x5b0 [ 41.621972] vfs_readv+0xd3/0x130 [ 41.625425] ? compat_rw_copy_check_uvector+0x310/0x310 [ 41.630773] ? __fget+0x237/0x370 [ 41.634205] ? __fget_light+0x172/0x1f0 [ 41.638157] do_readv+0x10a/0x2d0 [ 41.641595] ? vfs_readv+0x130/0x130 [ 41.645285] ? do_preadv+0x200/0x200 [ 41.648977] SyS_readv+0x28/0x30 [ 41.652328] do_syscall_64+0x1e8/0x640 [ 41.656192] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 41.661011] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 41.666176] RIP: 0033:0x443549 [ 41.669340] RSP: 002b:00007fff8cdec9a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 [ 41.677032] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000443549 [ 41.684810] RDX: 0000000000000001 RSI: 0000000020000200 RDI: 0000000000000004 [ 41.692149] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 41.699398] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 [ 41.706648] R13: 0000000000404350 R14: 0000000000000000 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