====================================================== WARNING: possible circular locking dependency detected 4.14.101+ #14 Not tainted ------------------------------------------------------ syz-executor.4/12125 is trying to acquire lock: (&cpuctx_mutex/1){+.+.}, at: [] mutex_lock_double kernel/events/core.c:9891 [inline] (&cpuctx_mutex/1){+.+.}, at: [] __perf_event_ctx_lock_double kernel/events/core.c:9950 [inline] (&cpuctx_mutex/1){+.+.}, at: [] SYSC_perf_event_open kernel/events/core.c:10215 [inline] (&cpuctx_mutex/1){+.+.}, at: [] SyS_perf_event_open+0x11f1/0x2520 kernel/events/core.c:9970 but task is already holding lock: (&cpuctx_mutex){+.+.}, at: [] mutex_lock_double kernel/events/core.c:9890 [inline] (&cpuctx_mutex){+.+.}, at: [] __perf_event_ctx_lock_double kernel/events/core.c:9950 [inline] (&cpuctx_mutex){+.+.}, at: [] SYSC_perf_event_open kernel/events/core.c:10215 [inline] (&cpuctx_mutex){+.+.}, at: [] SyS_perf_event_open+0x11e4/0x2520 kernel/events/core.c:9970 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&cpuctx_mutex){+.+.}: -> #1 (pmus_lock){+.+.}: -> #0 (&cpuctx_mutex/1){+.+.}: other info that might help us debug this: Chain exists of: &cpuctx_mutex/1 --> pmus_lock --> &cpuctx_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cpuctx_mutex); lock(pmus_lock); lock(&cpuctx_mutex); lock(&cpuctx_mutex/1); *** DEADLOCK *** 1 lock held by syz-executor.4/12125: #0: (&cpuctx_mutex){+.+.}, at: [] mutex_lock_double kernel/events/core.c:9890 [inline] #0: (&cpuctx_mutex){+.+.}, at: [] __perf_event_ctx_lock_double kernel/events/core.c:9950 [inline] #0: (&cpuctx_mutex){+.+.}, at: [] SYSC_perf_event_open kernel/events/core.c:10215 [inline] #0: (&cpuctx_mutex){+.+.}, at: [] SyS_perf_event_open+0x11e4/0x2520 kernel/events/core.c:9970 stack backtrace: CPU: 0 PID: 12125 Comm: syz-executor.4 Not tainted 4.14.101+ #14 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x10e lib/dump_stack.c:53 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258 kauditd_printk_skb: 375 callbacks suppressed audit: type=1400 audit(2000000125.756:5364): avc: denied { map } for pid=12186 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 audit: type=1400 audit(2000000125.806:5365): avc: denied { map } for pid=12189 comm="modprobe" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000125.816:5366): avc: denied { map } for pid=12186 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 audit: type=1400 audit(2000000125.966:5367): avc: denied { map_create } for pid=12196 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(2000000125.976:5368): avc: denied { map_read map_write } for pid=12196 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(2000000125.986:5369): avc: denied { create } for pid=12196 comm="syz-executor.5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 audit: type=1400 audit(2000000126.026:5370): avc: denied { create } for pid=12196 comm="syz-executor.5" 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(2000000126.026:5371): avc: denied { write } for pid=12196 comm="syz-executor.5" 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(2000000126.076:5372): avc: denied { map } for pid=12202 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000126.076:5373): avc: denied { map } for pid=12202 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kauditd_printk_skb: 370 callbacks suppressed audit: type=1400 audit(2000000130.766:5744): avc: denied { map } for pid=12343 comm="modprobe" 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: type=1400 audit(2000000130.776:5745): avc: denied { map } for pid=12338 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 audit: type=1400 audit(2000000130.786:5746): avc: denied { map } for pid=12338 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 audit: type=1400 audit(2000000130.796:5747): avc: denied { map } for pid=12343 comm="modprobe" 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: type=1400 audit(2000000130.826:5748): avc: denied { map } for pid=12343 comm="modprobe" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000130.856:5749): avc: denied { map } for pid=12343 comm="modprobe" path="/lib/x86_64-linux-gnu/libkmod.so.2.1.3" dev="sda1" ino=2811 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000130.866:5750): avc: denied { map } for pid=12343 comm="modprobe" path="/lib/x86_64-linux-gnu/libkmod.so.2.1.3" dev="sda1" ino=2811 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000130.886:5751): avc: denied { map } for pid=12343 comm="modprobe" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000130.886:5752): avc: denied { map } for pid=12343 comm="modprobe" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000000130.906:5753): avc: denied { map } for pid=12345 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