** ** ** If you see this message and you are not debugging ** ** the kernel, report this immediately to your vendor! ** ** ** ====================================================== WARNING: possible circular locking dependency detected 4.14.182-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/17890 is trying to acquire lock: (&event->child_mutex){+.+.}, at: [] perf_read_group kernel/events/core.c:4536 [inline] (&event->child_mutex){+.+.}, at: [] __perf_read kernel/events/core.c:4618 [inline] (&event->child_mutex){+.+.}, at: [] perf_read+0x2a1/0x7c0 kernel/events/core.c:4633 but task is already holding lock: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1235 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&cpuctx_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 perf_event_init_cpu+0xb7/0x170 kernel/events/core.c:11244 perf_event_init+0x2cc/0x308 kernel/events/core.c:11291 start_kernel+0x46b/0x771 init/main.c:620 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240 -> #4 (pmus_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 perf_event_init_cpu+0x2c/0x170 kernel/events/core.c:11238 cpuhp_invoke_callback+0x1e6/0x1a90 kernel/cpu.c:184 cpuhp_up_callbacks kernel/cpu.c:572 [inline] _cpu_up+0x21a/0x520 kernel/cpu.c:1140 do_cpu_up kernel/cpu.c:1175 [inline] do_cpu_up+0x9a/0x160 kernel/cpu.c:1147 smp_init+0x197/0x1ac kernel/smp.c:578 kernel_init_freeable+0x3f4/0x615 init/main.c:1068 kernel_init+0xd/0x15b init/main.c:1000 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 -> #3 (cpu_hotplug_lock.rw_sem){++++}: 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+0x39/0xc0 kernel/cpu.c:295 static_key_slow_inc+0xe/0x20 kernel/jump_label.c:123 tracepoint_add_func kernel/tracepoint.c:223 [inline] tracepoint_probe_register_prio+0x4dc/0x6d0 kernel/tracepoint.c:283 trace_event_reg+0x272/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+0x424/0xa50 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8127 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9363 ** NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE ** perf_init_event kernel/events/core.c:9401 [inline] perf_event_alloc.part.0+0xdd4/0x25c0 kernel/events/core.c:9661 ********************************************************** perf_event_alloc kernel/events/core.c:10014 [inline] SYSC_perf_event_open kernel/events/core.c:10118 [inline] SyS_perf_event_open+0x68c/0x24b0 kernel/events/core.c:10004 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #2 (tracepoints_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 tracepoint_probe_register_prio+0x36/0x6d0 kernel/tracepoint.c:279 trace_event_reg+0x272/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+0x424/0xa50 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8127 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9363 perf_init_event kernel/events/core.c:9401 [inline] perf_event_alloc.part.0+0xdd4/0x25c0 kernel/events/core.c:9661 perf_event_alloc kernel/events/core.c:10014 [inline] SYSC_perf_event_open kernel/events/core.c:10118 [inline] SyS_perf_event_open+0x68c/0x24b0 kernel/events/core.c:10004 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #1 (event_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 perf_trace_destroy+0x23/0xf0 kernel/trace/trace_event_perf.c:234 _free_event+0x328/0xe50 kernel/events/core.c:4238 free_event+0x32/0x40 kernel/events/core.c:4265 perf_event_release_kernel+0x35c/0x870 kernel/events/core.c:4409 perf_release+0x33/0x40 kernel/events/core.c:4435 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x113/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0x9fb/0x2ae0 kernel/exit.c:858 do_group_exit+0x100/0x2e0 kernel/exit.c:955 get_signal+0x385/0x1c90 kernel/signal.c:2423 do_signal+0x7c/0x15d0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #0 (&event->child_mutex){+.+.}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 perf_read_group kernel/events/core.c:4536 [inline] __perf_read kernel/events/core.c:4618 [inline] perf_read+0x2a1/0x7c0 kernel/events/core.c:4633 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 do_readv+0xfc/0x2c0 fs/read_write.c:1014 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb other info that might help us debug this: Chain exists of: &event->child_mutex --> pmus_lock --> &cpuctx_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cpuctx_mutex); lock(pmus_lock); lock(&cpuctx_mutex); lock(&event->child_mutex); *** DEADLOCK *** 1 lock held by syz-executor.2/17890: #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1235 stack backtrace: CPU: 1 PID: 17890 Comm: syz-executor.2 Not tainted 4.14.182-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+0x1b2/0x283 lib/dump_stack.c:58 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x3057/0x42a0 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xe8/0x1430 kernel/locking/mutex.c:893 perf_read_group kernel/events/core.c:4536 [inline] __perf_read kernel/events/core.c:4618 [inline] perf_read+0x2a1/0x7c0 kernel/events/core.c:4633 do_loop_readv_writev fs/read_write.c:695 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_read+0x3e3/0x5a0 fs/read_write.c:919 vfs_readv+0xd3/0x130 fs/read_write.c:981 do_readv+0xfc/0x2c0 fs/read_write.c:1014 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007f1a994dfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000013 RAX: ffffffffffffffda RBX: 00000000004fb300 RCX: 000000000045ca69 RDX: 0000000000000002 RSI: 0000000020000500 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000892 R14: 00000000004cb498 R15: 00007f1a994e06d4 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1800 audit(1590804917.458:4823): pid=17906 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=16018 res=0 audit: type=1800 audit(1590804917.488:4824): pid=17906 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="bus" dev="sda1" ino=16018 res=0 audit: type=1800 audit(1590804917.598:4825): pid=17922 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=16030 res=0 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. Process accounting resumed Process accounting resumed SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pid=17996 comm=syz-executor.2 audit: type=1800 audit(1590804919.188:4826): pid=17986 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.0" name="file0" dev="sda1" ino=16105 res=0 Process accounting resumed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect audit: type=1800 audit(1590804920.788:4827): pid=18080 uid=0 auid=0 ses=4 subj=system_u:system_r:kernel_t:s0 op="collect_data" cause="failed(directio)" comm="syz-executor.3" name="file0" dev="sda1" ino=16339 res=0 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.3'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 18398 Comm: syz-executor.3 Not tainted 4.14.182-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+0x1b2/0x283 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x154 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x2c1/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sctp_setsockopt_bindx+0xad/0x3e0 net/sctp/socket.c:1028 sctp_setsockopt net/sctp/socket.c:4024 [inline] sctp_setsockopt+0x1c15/0x3be0 net/sctp/socket.c:3994 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007fe80f8b1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000505340 RCX: 000000000045ca69 RDX: 0000000000000064 RSI: 0000000000000084 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000b13 R14: 00000000004d7cf8 R15: 00007fe80f8b26d4 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 18425 Comm: syz-executor.3 Not tainted 4.14.182-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+0x1b2/0x283 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x154 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] kmem_cache_alloc+0x40/0x3c0 mm/slab.c:3550 sctp_bucket_create net/sctp/socket.c:7433 [inline] sctp_get_port_local+0x2f2/0x1020 net/sctp/socket.c:7192 sctp_do_bind+0x1df/0x550 net/sctp/socket.c:429 sctp_bindx_add+0x80/0x160 net/sctp/socket.c:523 sctp_setsockopt_bindx+0x1e8/0x3e0 net/sctp/socket.c:1063 sctp_setsockopt net/sctp/socket.c:4024 [inline] sctp_setsockopt+0x1c15/0x3be0 net/sctp/socket.c:3994 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007fe80f8b1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000505340 RCX: 000000000045ca69 RDX: 0000000000000064 RSI: 0000000000000084 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000b13 R14: 00000000004d7cf8 R15: 00007fe80f8b26d4 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 nla_parse: 18 callbacks suppressed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. CPU: 0 PID: 18436 Comm: syz-executor.3 Not tainted 4.14.182-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+0x1b2/0x283 lib/dump_stack.c:58 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold+0x10a/0x154 lib/fault-inject.c:149 should_failslab+0xd6/0x130 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3376 [inline] kmem_cache_alloc_trace+0x47/0x3f0 mm/slab.c:3616 kmalloc include/linux/slab.h:488 [inline] kzalloc include/linux/slab.h:661 [inline] sctp_add_bind_addr+0x6c/0x350 net/sctp/bind_addr.c:159 sctp_do_bind+0x2a9/0x550 net/sctp/socket.c:440 sctp_bindx_add+0x80/0x160 net/sctp/socket.c:523 sctp_setsockopt_bindx+0x1e8/0x3e0 net/sctp/socket.c:1063 sctp_setsockopt net/sctp/socket.c:4024 [inline] sctp_setsockopt+0x1c15/0x3be0 net/sctp/socket.c:3994 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x110/0x1e0 net/socket.c:1844 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45ca69 RSP: 002b:00007fe80f8b1c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000505340 RCX: 000000000045ca69 RDX: 0000000000000064 RSI: 0000000000000084 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000b13 R14: 00000000004d7cf8 R15: 00007fe80f8b26d4 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'.