2017/11/10 14:26:35 parsed 1 programs 2017/11/10 14:26:35 executed programs: 0 syzkaller login: [ 23.619268] [ 23.619436] ====================================================== [ 23.620007] WARNING: possible circular locking dependency detected [ 23.620596] 4.14.0-rc8-next-20171110+ #12 Not tainted [ 23.621192] ------------------------------------------------------ [ 23.621735] syz-executor0/3019 is trying to acquire lock: [ 23.622200] (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 [ 23.622899] [ 23.622899] but task is already holding lock: [ 23.623408] (&mm->mmap_sem){++++}, at: [] vm_mmap_pgoff+0x198/0x280 [ 23.624105] [ 23.624105] which lock already depends on the new lock. [ 23.624105] [ 23.624874] [ 23.624874] the existing dependency chain (in reverse order) is: [ 23.625669] [ 23.625669] -> #7 (&mm->mmap_sem){++++}: [ 23.626159] lock_acquire+0x1d5/0x580 [ 23.626518] __might_fault+0x13a/0x1d0 [ 23.626903] _copy_to_user+0x2c/0xc0 [ 23.627262] filldir+0x1a7/0x320 [ 23.627586] dcache_readdir+0x12d/0x5e0 [ 23.627970] iterate_dir+0x1ca/0x540 [ 23.628362] SyS_getdents+0x225/0x450 [ 23.628742] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.629295] [ 23.629295] -> #6 (&sb->s_type->i_mutex_key#5){++++}: [ 23.630003] __schedule+0x24e/0x2060 [ 23.630422] [ 23.630422] -> #5 ((completion)&req.done){+.+.}: [ 23.631064] lock_acquire+0x1d5/0x580 [ 23.631477] wait_for_completion+0xcb/0x7b0 [ 23.632071] devtmpfs_create_node+0x32b/0x4a0 [ 23.632625] device_add+0x120f/0x1640 [ 23.633346] device_create_groups_vargs+0x1f3/0x250 [ 23.633972] device_create+0xda/0x110 [ 23.634539] msr_device_create+0x26/0x40 [ 23.635021] cpuhp_invoke_callback+0x2ea/0x1d20 [ 23.635574] cpuhp_thread_fun+0x48b/0x7e0 [ 23.636044] smpboot_thread_fn+0x450/0x7c0 [ 23.636592] kthread+0x37a/0x440 [ 23.637017] ret_from_fork+0x24/0x30 [ 23.637376] [ 23.637376] -> #4 (cpuhp_state-up){+.+.}: [ 23.637902] lock_acquire+0x1d5/0x580 [ 23.638292] cpuhp_issue_call+0x1e5/0x520 [ 23.638768] __cpuhp_setup_state_cpuslocked+0x2c7/0x5f0 [ 23.639322] __cpuhp_setup_state+0xb0/0x140 [ 23.639757] page_writeback_init+0x4d/0x71 [ 23.640164] pagecache_init+0x48/0x4f [ 23.640522] start_kernel+0x6bc/0x74f [ 23.640888] x86_64_start_reservations+0x2a/0x2c [ 23.641324] x86_64_start_kernel+0x77/0x7a [ 23.641718] secondary_startup_64+0xa5/0xb0 [ 23.642117] [ 23.642117] -> #3 (cpuhp_state_mutex){+.+.}: [ 23.642608] lock_acquire+0x1d5/0x580 [ 23.642966] __mutex_lock+0x16f/0x19d0 [ 23.643331] mutex_lock_nested+0x16/0x20 [ 23.643711] __cpuhp_setup_state_cpuslocked+0x5b/0x5f0 [ 23.644189] __cpuhp_setup_state+0xb0/0x140 [ 23.644591] kvm_guest_init+0x1f3/0x20f [ 23.644976] setup_arch+0x17c4/0x19de [ 23.645335] start_kernel+0xa5/0x74f [ 23.645685] x86_64_start_reservations+0x2a/0x2c [ 23.646121] x86_64_start_kernel+0x77/0x7a [ 23.646515] secondary_startup_64+0xa5/0xb0 [ 23.646914] [ 23.646914] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 23.647447] lock_acquire+0x1d5/0x580 [ 23.647805] cpus_read_lock+0x42/0x90 [ 23.648162] static_key_slow_inc+0x9d/0x3c0 [ 23.648564] tracepoint_probe_register_prio+0x80d/0x9a0 [ 23.649116] tracepoint_probe_register+0x2a/0x40 [ 23.649555] trace_event_reg+0x167/0x320 [ 23.649935] perf_trace_init+0x4ef/0xab0 [ 23.650315] perf_tp_event_init+0x7d/0xf0 [ 23.650702] perf_try_init_event+0xc9/0x1f0 [ 23.651103] perf_event_alloc+0x1cc6/0x2b00 [ 23.651788] SYSC_perf_event_open+0x842/0x2f10 [ 23.652345] SyS_perf_event_open+0x39/0x50 [ 23.652856] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.653356] [ 23.653356] -> #1 (tracepoints_mutex){+.+.}: [ 23.653870] lock_acquire+0x1d5/0x580 [ 23.654250] __mutex_lock+0x16f/0x19d0 [ 23.654615] mutex_lock_nested+0x16/0x20 [ 23.654995] tracepoint_probe_register_prio+0xa0/0x9a0 [ 23.655482] tracepoint_probe_register+0x2a/0x40 [ 23.655919] trace_event_reg+0x167/0x320 [ 23.656372] perf_trace_init+0x4ef/0xab0 [ 23.656779] perf_tp_event_init+0x7d/0xf0 [ 23.657191] perf_try_init_event+0xc9/0x1f0 [ 23.657600] perf_event_alloc+0x1cc6/0x2b00 [ 23.658000] SYSC_perf_event_open+0x842/0x2f10 [ 23.658446] SyS_perf_event_open+0x39/0x50 [ 23.658841] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.659315] [ 23.659315] -> #0 (event_mutex){+.+.}: [ 23.659764] __lock_acquire+0x3374/0x4770 [ 23.660174] lock_acquire+0x1d5/0x580 [ 23.660557] __mutex_lock+0x16f/0x19d0 [ 23.660965] mutex_lock_nested+0x16/0x20 [ 23.661372] perf_trace_destroy+0x28/0x100 [ 23.661765] tp_perf_event_destroy+0x15/0x20 [ 23.662189] _free_event+0x3bd/0x10f0 [ 23.662553] put_event+0x24/0x30 [ 23.662876] perf_mmap_close+0x60d/0x1010 [ 23.663285] remove_vma+0xb4/0x1b0 [ 23.663623] do_munmap+0x82a/0xdf0 [ 23.663960] mmap_region+0x59e/0x15a0 [ 23.664369] do_mmap+0x6c6/0xe10 [ 23.664724] vm_mmap_pgoff+0x1de/0x280 [ 23.665089] SyS_mmap_pgoff+0x23b/0x5f0 [ 23.665494] SyS_mmap+0x16/0x20 [ 23.665809] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.666266] [ 23.666266] other info that might help us debug this: [ 23.666266] [ 23.666939] Chain exists of: [ 23.666939] event_mutex --> &sb->s_type->i_mutex_key#5 --> &mm->mmap_sem [ 23.666939] [ 23.667900] Possible unsafe locking scenario: [ 23.667900] [ 23.668420] CPU0 CPU1 [ 23.668819] ---- ---- [ 23.669204] lock(&mm->mmap_sem); [ 23.669521] lock(&sb->s_type->i_mutex_key#5); [ 23.670117] lock(&mm->mmap_sem); [ 23.670638] lock(event_mutex); [ 23.670919] [ 23.670919] *** DEADLOCK *** [ 23.670919] [ 23.671443] 1 lock held by syz-executor0/3019: [ 23.671821] #0: (&mm->mmap_sem){++++}, at: [] vm_mmap_pgoff+0x198/0x280 [ 23.672548] [ 23.672548] stack backtrace: [ 23.672991] CPU: 1 PID: 3019 Comm: syz-executor0 Not tainted 4.14.0-rc8-next-20171110+ #12 [ 23.673857] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 23.674548] Call Trace: [ 23.674768] dump_stack+0x194/0x257 [ 23.675072] ? arch_local_irq_restore+0x53/0x53 [ 23.675472] print_circular_bug+0x503/0x710 [ 23.675834] ? print_circular_bug_entry+0xb0/0xb0 [ 23.676237] ? check_usage+0xb70/0xb70 [ 23.676570] check_prev_add+0x8b1/0x1580 [ 23.677154] ? copy_trace+0x1d0/0x1d0 [ 23.677484] ? check_usage+0xb70/0xb70 [ 23.677810] ? __lock_acquire+0x3374/0x4770 [ 23.678171] ? __lock_acquire+0x3374/0x4770 [ 23.678543] __lock_acquire+0x3374/0x4770 [ 23.678889] ? __lock_acquire+0x3374/0x4770 [ 23.679252] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 23.679694] ? find_held_lock+0x39/0x1d0 [ 23.680033] ? print_usage_bug+0x480/0x480 [ 23.680398] ? lock_downgrade+0x990/0x990 [ 23.680783] ? pvclock_read_flags+0x160/0x160 [ 23.681197] ? __lock_acquire+0x739/0x4770 [ 23.681586] ? __lock_is_held+0xbc/0x140 [ 23.681938] ? check_noncircular+0x20/0x20 [ 23.682292] ? print_usage_bug+0x480/0x480 [ 23.682654] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 23.683098] ? print_usage_bug+0x480/0x480 [ 23.683468] ? check_noncircular+0x20/0x20 [ 23.683821] ? __lock_acquire+0x739/0x4770 [ 23.684191] ? check_noncircular+0x20/0x20 [ 23.684556] ? perf_event_detach_bpf_prog+0x92/0x3d0 [ 23.685051] lock_acquire+0x1d5/0x580 [ 23.685381] ? perf_trace_destroy+0x28/0x100 [ 23.685772] ? lock_release+0xd70/0xd70 [ 23.686130] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 23.686644] ? perf_event_detach_bpf_prog+0x92/0x3d0 [ 23.687094] ? preempt_notifier_dec+0x20/0x20 [ 23.687490] ? rcu_note_context_switch+0x710/0x710 [ 23.687916] ? __might_sleep+0x95/0x190 [ 23.688270] ? perf_trace_destroy+0x28/0x100 [ 23.688650] __mutex_lock+0x16f/0x19d0 [ 23.689023] ? perf_trace_destroy+0x28/0x100 [ 23.689389] ? perf_trace_destroy+0x28/0x100 [ 23.689767] ? lock_downgrade+0x990/0x990 [ 23.690128] ? mutex_lock_io_nested+0x1880/0x1880 [ 23.690539] ? print_usage_bug+0x480/0x480 [ 23.690894] ? find_held_lock+0x39/0x1d0 [ 23.691245] ? check_noncircular+0x20/0x20 [ 23.691609] ? __mutex_unlock_slowpath+0xe9/0xac0 [ 23.692013] ? wait_for_completion+0x7b0/0x7b0 [ 23.692408] ? __wake_up_common_lock+0x190/0x310 [ 23.692834] ? find_held_lock+0x39/0x1d0 [ 23.693186] ? check_noncircular+0x20/0x20 [ 23.693539] ? perf_addr_filters_splice+0x18f/0x810 [ 23.693965] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 23.694445] ? free_filters_list+0x2f0/0x2f0 [ 23.694903] ? mutex_unlock+0xd/0x10 [ 23.695234] ? __lock_is_held+0xbc/0x140 [ 23.695572] mutex_lock_nested+0x16/0x20 [ 23.695908] ? mutex_lock_nested+0x16/0x20 [ 23.696272] perf_trace_destroy+0x28/0x100 [ 23.696623] ? perf_tp_event_init+0xf0/0xf0 [ 23.697217] tp_perf_event_destroy+0x15/0x20 [ 23.697585] _free_event+0x3bd/0x10f0 [ 23.697902] ? ring_buffer_attach+0x830/0x830 [ 23.698287] ? wait_for_completion+0x7b0/0x7b0 [ 23.698668] ? ring_buffer_put+0x140/0x140 [ 23.699023] ? lock_release+0xd70/0xd70 [ 23.699384] ? atomic_dec_and_mutex_lock+0x112/0x150 [ 23.699807] ? atomic_dec_and_mutex_lock+0x112/0x150 [ 23.700246] put_event+0x24/0x30 [ 23.700527] perf_mmap_close+0x60d/0x1010 [ 23.700933] ? perf_compat_ioctl+0x70/0x70 [ 23.701317] ? save_stack+0x43/0xd0 [ 23.701620] ? check_noncircular+0x20/0x20 [ 23.701973] ? do_munmap+0x82a/0xdf0 [ 23.702295] ? mmap_region+0x59e/0x15a0 [ 23.702626] ? do_mmap+0x6c6/0xe10 [ 23.702922] ? SyS_mmap_pgoff+0x23b/0x5f0 [ 23.703280] ? SyS_mmap+0x16/0x20 [ 23.703570] ? entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.703980] ? unmap_region+0x35c/0x4f0 [ 23.704324] ? up_read+0x40/0x40 [ 23.704606] ? check_noncircular+0x20/0x20 [ 23.705004] ? reusable_anon_vma+0x560/0x560 [ 23.705395] ? __lock_is_held+0xbc/0x140 [ 23.705747] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 23.706269] ? rcu_note_context_switch+0x710/0x710 [ 23.706692] ? __might_sleep+0x95/0x190 [ 23.707032] ? perf_compat_ioctl+0x70/0x70 [ 23.707410] remove_vma+0xb4/0x1b0 [ 23.707715] do_munmap+0x82a/0xdf0 [ 23.708021] mmap_region+0x59e/0x15a0 [ 23.708361] ? SyS_brk+0x6f0/0x6f0 [ 23.708663] ? arch_get_unmapped_area_topdown+0xba/0x8a0 [ 23.709126] ? arch_get_unmapped_area+0x750/0x750 [ 23.709552] ? lock_acquire+0x1d5/0x580 [ 23.709883] ? vm_mmap_pgoff+0x198/0x280 [ 23.710231] ? filp_close+0x1a1/0x240 [ 23.710560] ? selinux_mmap_addr+0x1f/0xf0 [ 23.710913] ? security_mmap_addr+0x79/0xa0 [ 23.711271] ? get_unmapped_area+0x265/0x300 [ 23.711651] do_mmap+0x6c6/0xe10 [ 23.711933] ? mmap_region+0x15a0/0x15a0 [ 23.712270] ? vm_mmap_pgoff+0x198/0x280 [ 23.712619] ? down_read_killable+0x180/0x180 [ 23.713021] ? security_mmap_file+0x143/0x180 [ 23.713545] vm_mmap_pgoff+0x1de/0x280 [ 23.713924] ? vma_is_stack_for_current+0xa0/0xa0 [ 23.714420] ? _raw_spin_unlock_irq+0x27/0x70 [ 23.714866] ? SyS_futex+0x269/0x390 [ 23.715285] SyS_mmap_pgoff+0x23b/0x5f0 [ 23.715738] ? find_mergeable_anon_vma+0xd0/0xd0 [ 23.716728] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 23.717344] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 23.717926] SyS_mmap+0x16/0x20 [ 23.718322] entry_SYSCALL_64_fastpath+0x1f/0x96 [ 23.718861] RIP: 0033:0x447c99 [ 23.719227] RSP: 002b:00007fe7d27b6bd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 [ 23.720107] RAX: ffffffffffffffda RBX: 00007fe7d27b76cc RCX: 0000000000447c99 [ 23.720964] RDX: 0000000000000003 RSI: 0000000000292000 RDI: 0000000020000000 [ 23.721772] RBP: 0000000000000086 R08: ffffffffffffffff R09: 0000000000000000 [ 23.722601] R10: 0000000000000032 R11: 0000000000000246 R12: 0000000000000000 [ 23.723587] R13: 0000000000000000 R14: 00007fe7d27b79c0 R15: 00007fe7d27b7700