====================================================== WARNING: possible circular locking dependency detected 4.14.97+ #3 Not tainted ------------------------------------------------------ syz-executor1/22976 is trying to acquire lock: (&mm->mmap_sem){++++}, at: [] __might_fault+0xd4/0x1b0 mm/memory.c:4577 but task is already holding lock: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1240 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&cpuctx_mutex){+.+.}: -> #4 (pmus_lock){+.+.}: -> #3 (cpu_hotplug_lock.rw_sem){++++}: -> #2 (&sb->s_type->i_mutex_key#10){+.+.}: -> #1 (ashmem_mutex){+.+.}: -> #0 (&mm->mmap_sem){++++}: other info that might help us debug this: Chain exists of: &mm->mmap_sem --> pmus_lock --> &cpuctx_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cpuctx_mutex); lock(pmus_lock); lock(&cpuctx_mutex); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor1/22976: #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0x14d/0x2c0 kernel/events/core.c:1240 stack backtrace: CPU: 0 PID: 22976 Comm: syz-executor1 Not tainted 4.14.97+ #3 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: 366 callbacks suppressed audit: type=1400 audit(1549396305.308:13084): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libutil-2.13.so" dev="sda1" ino=2681 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396305.338:13085): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libutil-2.13.so" dev="sda1" ino=2681 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 ip6_tunnel: ip6tnl1 xmit: Local address not yet configured! audit: type=1400 audit(1549396305.358:13086): avc: denied { map } for pid=23013 comm="getty" 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(1549396305.358:13087): avc: denied { map } for pid=23013 comm="getty" 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(1549396305.468:13088): avc: denied { map } for pid=23013 comm="getty" 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(1549396305.468:13089): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libnss_compat-2.13.so" dev="sda1" ino=2683 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396305.468:13090): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libnss_compat-2.13.so" dev="sda1" ino=2683 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396305.498:13091): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libnsl-2.13.so" dev="sda1" ino=2693 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396305.498:13092): avc: denied { map } for pid=23013 comm="getty" path="/lib/x86_64-linux-gnu/libnsl-2.13.so" dev="sda1" ino=2693 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396305.498:13093): avc: denied { map } for pid=23013 comm="getty" 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 ip6_tunnel: ip6tnl1 xmit: Local address not yet configured! kauditd_printk_skb: 425 callbacks suppressed audit: type=1400 audit(1549396310.318:13519): avc: denied { map } for pid=23166 comm="blkid" 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(1549396310.348:13520): avc: denied { map } for pid=23166 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396310.348:13521): avc: denied { map } for pid=23166 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(1549396310.358:13522): avc: denied { map } for pid=23166 comm="blkid" 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(1549396310.358:13523): avc: denied { map } for pid=23166 comm="blkid" 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(1549396310.368:13524): avc: denied { map } for pid=23166 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(1549396310.368:13525): avc: denied { map } for pid=23166 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(1549396310.488:13526): avc: denied { create } for pid=23167 comm="syz-executor2" 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(1549396310.488:13527): avc: denied { write } for pid=23167 comm="syz-executor2" 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(1549396310.498:13528): avc: denied { map } for pid=23169 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