====================================================== WARNING: possible circular locking dependency detected 4.14.167-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/14070 is trying to acquire lock: (event_mutex){+.+.}, at: [] perf_trace_destroy+0x28/0x100 kernel/trace/trace_event_perf.c:234 but task is already holding lock: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 kernel/events/core.c:4397 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&event->child_mutex){+.+.}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_event_for_each_child+0x8a/0x150 kernel/events/core.c:4682 perf_event_task_disable+0x97/0x120 kernel/events/core.c:4928 SYSC_prctl kernel/sys.c:2288 [inline] SyS_prctl+0x4c7/0xc50 kernel/sys.c:2197 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #4 (&cpuctx_mutex){+.+.}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_event_init_cpu+0xc2/0x170 kernel/events/core.c:11223 perf_event_init+0x2d8/0x31a kernel/events/core.c:11270 start_kernel+0x3b6/0x6fd init/main.c:620 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:399 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:380 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240 -> #3 (pmus_lock){+.+.}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_event_init_cpu+0x2f/0x170 kernel/events/core.c:11217 cpuhp_invoke_callback+0x1ea/0x1ab0 kernel/cpu.c:184 cpuhp_up_callbacks kernel/cpu.c:573 [inline] _cpu_up+0x228/0x530 kernel/cpu.c:1135 do_cpu_up kernel/cpu.c:1170 [inline] do_cpu_up+0xa6/0x160 kernel/cpu.c:1142 cpu_up+0x1b/0x20 kernel/cpu.c:1178 smp_init+0x157/0x170 kernel/smp.c:578 kernel_init_freeable+0x30b/0x532 init/main.c:1066 kernel_init+0x12/0x162 init/main.c:998 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #2 (cpu_hotplug_lock.rw_sem){++++}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] cpus_read_lock+0x3d/0xc0 kernel/cpu.c:295 static_key_slow_inc+0x13/0x30 kernel/jump_label.c:123 tracepoint_add_func kernel/tracepoint.c:223 [inline] tracepoint_probe_register_prio+0x4d6/0x6d0 kernel/tracepoint.c:283 tracepoint_probe_register+0x2b/0x40 kernel/tracepoint.c:304 trace_event_reg+0x277/0x330 kernel/trace/trace_events.c:305 perf_trace_event_reg kernel/trace/trace_event_perf.c:122 [inline] perf_trace_event_init kernel/trace/trace_event_perf.c:197 [inline] perf_trace_init+0x449/0xaa0 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x7d/0xf0 kernel/events/core.c:8106 perf_try_init_event+0x164/0x200 kernel/events/core.c:9342 perf_init_event kernel/events/core.c:9380 [inline] perf_event_alloc.part.0+0xd92/0x25c0 kernel/events/core.c:9640 perf_event_alloc kernel/events/core.c:9993 [inline] SYSC_perf_event_open+0xad1/0x2690 kernel/events/core.c:10097 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (tracepoints_mutex){+.+.}: lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 tracepoint_probe_register_prio+0x36/0x6d0 kernel/tracepoint.c:279 tracepoint_probe_register+0x2b/0x40 kernel/tracepoint.c:304 trace_event_reg+0x277/0x330 kernel/trace/trace_events.c:305 perf_trace_event_reg kernel/trace/trace_event_perf.c:122 [inline] perf_trace_event_init kernel/trace/trace_event_perf.c:197 [inline] perf_trace_init+0x449/0xaa0 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x7d/0xf0 kernel/events/core.c:8106 perf_try_init_event+0x164/0x200 kernel/events/core.c:9342 perf_init_event kernel/events/core.c:9380 [inline] perf_event_alloc.part.0+0xd92/0x25c0 kernel/events/core.c:9640 kauditd_printk_skb: 184 callbacks suppressed audit: type=1400 audit(1579956734.480:24789): avc: denied { map } for pid=14073 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 perf_event_alloc kernel/events/core.c:9993 [inline] SYSC_perf_event_open+0xad1/0x2690 kernel/events/core.c:10097 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (event_mutex){+.+.}: check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 audit: type=1400 audit(1579956734.500:24790): avc: denied { map } for pid=14073 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 perf_trace_destroy+0x28/0x100 kernel/trace/trace_event_perf.c:234 tp_perf_event_destroy+0x16/0x20 kernel/events/core.c:8090 _free_event+0x330/0xe70 kernel/events/core.c:4238 free_event+0x38/0x50 kernel/events/core.c:4265 perf_event_release_kernel+0x364/0x880 kernel/events/core.c:4409 perf_release+0x37/0x50 kernel/events/core.c:4435 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: event_mutex --> &cpuctx_mutex --> &event->child_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&event->child_mutex); lock(&cpuctx_mutex 9pnet: Insufficient options for proto=fd ); lock(&event->child_mutex); lock(event_mutex); *** DEADLOCK *** 2 locks held by syz-executor.2/14070: #0: (&ctx->mutex){+.+.}, at: [] perf_event_release_kernel+0x1fd/0x880 kernel/events/core.c:4396 #1: (&event->child_mutex){+.+.}, at: [] perf_event_release_kernel+0x207/0x880 kernel/events/core.c:4397 stack backtrace: CPU: 1 PID: 14070 Comm: syz-executor.2 Not tainted 4.14.167-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1901 [inline] check_prevs_add kernel/locking/lockdep.c:2018 [inline] validate_chain kernel/locking/lockdep.c:2460 [inline] __lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487 9pnet: Insufficient options for proto=fd lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893 audit: type=1400 audit(1579956734.820:24791): avc: denied { create } for pid=14071 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_trace_destroy+0x28/0x100 kernel/trace/trace_event_perf.c:234 tp_perf_event_destroy+0x16/0x20 kernel/events/core.c:8090 _free_event+0x330/0xe70 kernel/events/core.c:4238 free_event+0x38/0x50 kernel/events/core.c:4265 perf_event_release_kernel+0x364/0x880 kernel/events/core.c:4409 perf_release+0x37/0x50 kernel/events/core.c:4435 __fput+0x275/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x114/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45b349 RSP: 002b:00007f8caa4f8c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000021 RAX: 0000000000000006 RBX: 00007f8caa4f96d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 0000000000000006 RDI: 000000000000000a RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000097 R14: 00000000004c1dc5 R15: 000000000075c07c vhci_hcd: vhci_device speed not set audit: type=1400 audit(1579956734.850:24792): avc: denied { write } for pid=14071 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1579956734.850:24793): avc: denied { read } for pid=14071 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 vhci_hcd: vhci_device speed not set netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. vhci_hcd: vhci_device speed not set audit: type=1400 audit(1579956734.980:24794): avc: denied { map } for pid=14085 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1579956734.990:24795): avc: denied { map } for pid=14085 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 vhci_hcd: vhci_device speed not set audit: type=1400 audit(1579956735.010:24796): avc: denied { map } for pid=14085 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 vhci_hcd: vhci_device speed not set usb usb9-port2: Cannot enable. Maybe the USB cable is bad? audit: type=1400 audit(1579956735.040:24797): avc: denied { write } for pid=14066 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: audit_backlog=65 > audit_backlog_limit=64 vhci_hcd: vhci_device speed not set netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. vhci_hcd: vhci_device speed not set usb usb9-port2: Cannot enable. Maybe the USB cable is bad? usb usb9-port2: attempt power cycle vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set usb usb9-port2: Cannot enable. Maybe the USB cable is bad? vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set vhci_hcd: vhci_device speed not set usb usb9-port2: Cannot enable. Maybe the USB cable is bad? usb usb9-port2: unable to enumerate USB device vhci_hcd: SetHubDepth req not supported for USB 2.0 roothub netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. kauditd_printk_skb: 349 callbacks suppressed audit: type=1400 audit(1579956739.720:25139): avc: denied { create } for pid=14164 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 netlink: 232 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1400 audit(1579956739.720:25140): avc: denied { write } for pid=14164 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1579956739.730:25141): avc: denied { read } for pid=14164 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1579956739.730:25142): avc: denied { create } for pid=14164 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1579956739.810:25143): avc: denied { write } for pid=14164 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1579956740.060:25144): avc: denied { map } for pid=14182 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1579956740.060:25145): avc: denied { map } for pid=14182 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1579956740.070:25146): avc: denied { map } for pid=14182 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: audit_backlog=65 > audit_backlog_limit=64 audit: type=1400 audit(1579956740.070:25147): avc: denied { map } for pid=14182 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 232 bytes leftover after parsing attributes in process `syz-executor.3'. tmpfs: Bad value 'preÕÊ\ÖÎqƒù&{#ÞÉë„{V‚¡b ðAŽl96O½îB hÈ!|8}C¨q°wc¨'ÿù+#c_ô!³OƒÇáï„ÿÜO•}S™Æ"‡±< _ ü§w“€£¯Àƒ\¤' for mount option 'mpol'