====================================================== WARNING: possible circular locking dependency detected 4.14.266-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/13895 is trying to acquire lock: (&event->child_mutex){+.+.}, at: [] perf_event_read_value+0x78/0x410 kernel/events/core.c:4455 but task is already holding lock: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1241 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+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_init_cpu+0xb7/0x170 kernel/events/core.c:11252 perf_event_init+0x2cc/0x308 kernel/events/core.c:11299 start_kernel+0x46a/0x770 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+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_init_cpu+0x2c/0x170 kernel/events/core.c:11246 cpuhp_invoke_callback+0x1e6/0x1a80 kernel/cpu.c:185 cpuhp_up_callbacks kernel/cpu.c:573 [inline] _cpu_up+0x21e/0x520 kernel/cpu.c:1192 do_cpu_up+0x9a/0x160 kernel/cpu.c:1228 smp_init+0x197/0x1ac kernel/smp.c:578 kernel_init_freeable+0x406/0x626 init/main.c:1068 kernel_init+0xd/0x15e 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:296 static_key_slow_inc+0xe/0x20 kernel/jump_label.c:123 tracepoint_add_func+0x747/0xa40 kernel/tracepoint.c:269 tracepoint_probe_register_prio kernel/tracepoint.c:331 [inline] tracepoint_probe_register+0x8c/0xc0 kernel/tracepoint.c:352 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/0xa30 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8140 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9371 perf_init_event kernel/events/core.c:9409 [inline] perf_event_alloc.part.0+0xe2d/0x2640 kernel/events/core.c:9669 perf_event_alloc kernel/events/core.c:10022 [inline] SYSC_perf_event_open kernel/events/core.c:10126 [inline] SyS_perf_event_open+0x67f/0x24b0 kernel/events/core.c:10012 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+0xc4/0x1310 kernel/locking/mutex.c:893 tracepoint_probe_register_prio kernel/tracepoint.c:327 [inline] tracepoint_probe_register+0x68/0xc0 kernel/tracepoint.c:352 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/0xa30 kernel/trace/trace_event_perf.c:221 perf_tp_event_init+0x79/0xf0 kernel/events/core.c:8140 perf_try_init_event+0x15b/0x1f0 kernel/events/core.c:9371 perf_init_event kernel/events/core.c:9409 [inline] perf_event_alloc.part.0+0xe2d/0x2640 kernel/events/core.c:9669 perf_event_alloc kernel/events/core.c:10022 [inline] SYSC_perf_event_open kernel/events/core.c:10126 [inline] SyS_perf_event_open+0x67f/0x24b0 kernel/events/core.c:10012 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+0xc4/0x1310 kernel/locking/mutex.c:893 perf_trace_destroy+0x23/0xf0 kernel/trace/trace_event_perf.c:234 _free_event+0x321/0xe20 kernel/events/core.c:4246 free_event+0x32/0x40 kernel/events/core.c:4273 perf_event_release_kernel+0x368/0x8a0 kernel/events/core.c:4417 perf_release+0x33/0x40 kernel/events/core.c:4443 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 kernel/exit.c:868 SYSC_exit kernel/exit.c:934 [inline] SyS_exit+0x1e/0x20 kernel/exit.c:932 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 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+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_read_value+0x78/0x410 kernel/events/core.c:4455 perf_read_one kernel/events/core.c:4577 [inline] __perf_read kernel/events/core.c:4628 [inline] perf_read+0x3e2/0x7c0 kernel/events/core.c:4641 __vfs_read+0xe4/0x620 fs/read_write.c:411 vfs_read+0x139/0x340 fs/read_write.c:447 SYSC_read fs/read_write.c:574 [inline] SyS_read+0xf2/0x210 fs/read_write.c:567 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.5/13895: #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1241 stack backtrace: CPU: 1 PID: 13895 Comm: syz-executor.5 Not tainted 4.14.266-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/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e 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+0x2e0e/0x3f20 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+0xc4/0x1310 kernel/locking/mutex.c:893 perf_event_read_value+0x78/0x410 kernel/events/core.c:4455 perf_read_one kernel/events/core.c:4577 [inline] __perf_read kernel/events/core.c:4628 [inline] perf_read+0x3e2/0x7c0 kernel/events/core.c:4641 __vfs_read+0xe4/0x620 fs/read_write.c:411 vfs_read+0x139/0x340 fs/read_write.c:447 SYSC_read fs/read_write.c:574 [inline] SyS_read+0xf2/0x210 fs/read_write.c:567 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f1b2147f059 RSP: 002b:00007f1b1fdf4168 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f1b21591f60 RCX: 00007f1b2147f059 RDX: 0000000000002020 RSI: 00000000200002c0 RDI: 0000000000000003 RBP: 00007f1b214d908d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc08e3e47f R14: 00007f1b1fdf4300 R15: 0000000000022000 audit: type=1804 audit(1644614075.000:110): pid=13906 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/165/cgroup.controllers" dev="sda1" ino=14525 res=1 audit: type=1804 audit(1644614076.080:111): pid=13935 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/166/cgroup.controllers" dev="sda1" ino=13927 res=1 audit: type=1804 audit(1644614076.940:112): pid=13973 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/167/cgroup.controllers" dev="sda1" ino=14575 res=1 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. batman_adv: batadv0: Adding interface: macsec1 batman_adv: batadv0: The MTU of interface macsec1 is too small (1468) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. batman_adv: batadv0: Not using interface macsec1 (retrying later): interface not active audit: type=1800 audit(1644614077.370:113): pid=14006 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=14582 res=0 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. audit: type=1804 audit(1644614077.540:114): pid=14015 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir020331901/syzkaller.zHUzlX/173/bus" dev="sda1" ino=14582 res=1 batman_adv: batadv0: Adding interface: macsec2 batman_adv: batadv0: The MTU of interface macsec2 is too small (1468) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. batman_adv: batadv0: Not using interface macsec2 (retrying later): interface not active audit: type=1804 audit(1644614077.710:115): pid=14020 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/168/cgroup.controllers" dev="sda1" ino=14575 res=1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 bridge0: port 1(bridge_slave_0) entered disabled state batman_adv: batadv0: Interface deactivated: batadv_slave_0 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 batman_adv: batadv0: Interface deactivated: batadv_slave_1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 audit: type=1800 audit(1644614078.250:116): pid=14048 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="bus" dev="sda1" ino=13897 res=0 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 audit: type=1804 audit(1644614078.470:117): pid=14055 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir020331901/syzkaller.zHUzlX/174/bus" dev="sda1" ino=13897 res=1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready audit: type=1800 audit(1644614078.530:118): pid=14057 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=14530 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device bond0 IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready 8021q: adding VLAN 0 to HW filter on device team0 audit: type=1804 audit(1644614078.690:119): pid=14061 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/169/bus" dev="sda1" ino=14530 res=1 chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. batman_adv: batadv0: Adding interface: macsec3 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 batman_adv: batadv0: The MTU of interface macsec3 is too small (1468) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. batman_adv: batadv0: Not using interface macsec3 (retrying later): interface not active usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #1 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready syz-executor.2 (14057) used greatest stack depth: 24096 bytes left 8021q: adding VLAN 0 to HW filter on device bond0 IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready 8021q: adding VLAN 0 to HW filter on device team0 chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. batman_adv: batadv0: Adding interface: macsec4 batman_adv: batadv0: The MTU of interface macsec4 is too small (1468) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem. batman_adv: batadv0: Not using interface macsec4 (retrying later): interface not active kauditd_printk_skb: 5 callbacks suppressed audit: type=1804 audit(1644614080.241:125): pid=14132 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.4" name="/root/syzkaller-testdir020331901/syzkaller.zHUzlX/176/bus" dev="sda1" ino=14119 res=1 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready audit: type=1800 audit(1644614080.421:126): pid=14137 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=14525 res=0 IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device bond0 IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready 8021q: adding VLAN 0 to HW filter on device team0 audit: type=1804 audit(1644614080.561:127): pid=14140 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir463624376/syzkaller.BfrVNY/171/bus" dev="sda1" ino=14525 res=1 chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready 8021q: adding VLAN 0 to HW filter on device bond0 IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready 8021q: adding VLAN 0 to HW filter on device team0 ip_tables: iptables: counters copy to user failed while replacing table chnl_net:chnl_net_open(): err: Unable to register and open device, Err:-19 caif:caif_disconnect_client(): nothing to disconnect chnl_net:chnl_flowctrl_cb(): NET flowctrl func called flow: CLOSE/DEINIT chnl_net:chnl_net_open(): state disconnected A link change request failed with some changes committed already. Interface caif0 may have been left with an inconsistent configuration, please check. ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table ip_tables: iptables: counters copy to user failed while replacing table 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'. encrypted_key: insufficient parameters specified