====================================================== WARNING: possible circular locking dependency detected 4.19.150-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/12477 is trying to acquire lock: 000000000163317c (cpu_hotplug_lock.rw_sem){++++}, at: __static_key_slow_dec kernel/jump_label.c:212 [inline] 000000000163317c (cpu_hotplug_lock.rw_sem){++++}, at: static_key_slow_dec+0x6c/0xb0 kernel/jump_label.c:227 but task is already holding lock: 00000000c24b7e63 (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x152/0x200 mm/util.c:355 which lock already depends on the new lock. overlayfs: failed to resolve './file0': -2 the existing dependency chain (in reverse order) is: -> #3 (&mm->mmap_sem){++++}: perf_copy_attr+0xab/0x7a0 kernel/events/core.c:10251 _perf_ioctl+0x6aa/0x23f0 kernel/events/core.c:5125 perf_ioctl+0x55/0x80 kernel/events/core.c:5152 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&cpuctx_mutex){+.+.}: NILFS (loop3): I/O error reading segment perf_event_init_cpu+0xfe/0x1f0 kernel/events/core.c:11804 perf_event_init+0x470/0x4b8 kernel/events/core.c:11851 start_kernel+0x600/0x978 init/main.c:644 NILFS (loop3): error -5 while searching super root secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (pmus_lock){+.+.}: perf_event_init_cpu+0x2a/0x1f0 kernel/events/core.c:11798 cpuhp_invoke_callback+0x259/0x1de0 kernel/cpu.c:169 cpuhp_up_callbacks kernel/cpu.c:583 [inline] _cpu_up+0x284/0x560 kernel/cpu.c:1140 do_cpu_up+0xdd/0x230 kernel/cpu.c:1175 smp_init+0x1ed/0x202 kernel/smp.c:578 kernel_init_freeable+0x671/0xc31 init/main.c:1138 kernel_init+0xe/0x1e2 init/main.c:1062 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 -> #0 (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+0x3b/0xd0 kernel/cpu.c:289 __static_key_slow_dec kernel/jump_label.c:212 [inline] static_key_slow_dec+0x6c/0xb0 kernel/jump_label.c:227 sw_perf_event_destroy+0x99/0x140 kernel/events/core.c:8285 _free_event+0x32c/0x1240 kernel/events/core.c:4459 put_event kernel/events/core.c:4553 [inline] perf_mmap_close+0x77f/0xf50 kernel/events/core.c:5556 remove_vma+0xa9/0x170 mm/mmap.c:176 remove_vma_list mm/mmap.c:2550 [inline] do_munmap+0x717/0xe10 mm/mmap.c:2786 mmap_region+0x1f1/0x1510 mm/mmap.c:1700 do_mmap+0x8e8/0x1080 mm/mmap.c:1530 do_mmap_pgoff include/linux/mm.h:2326 [inline] vm_mmap_pgoff+0x197/0x200 mm/util.c:357 ksys_mmap_pgoff+0x2d1/0x660 mm/mmap.c:1580 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> &cpuctx_mutex --> &mm->mmap_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(&cpuctx_mutex); lock(&mm->mmap_sem); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 1 lock held by syz-executor.5/12477: #0: 00000000c24b7e63 (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x152/0x200 mm/util.c:355 stack backtrace: CPU: 0 PID: 12477 Comm: syz-executor.5 Not tainted 4.19.150-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x22c/0x33e lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1865 [inline] check_prevs_add kernel/locking/lockdep.c:1978 [inline] validate_chain kernel/locking/lockdep.c:2419 [inline] __lock_acquire+0x37ad/0x3ff0 kernel/locking/lockdep.c:3415 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3907 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+0x3b/0xd0 kernel/cpu.c:289 __static_key_slow_dec kernel/jump_label.c:212 [inline] static_key_slow_dec+0x6c/0xb0 kernel/jump_label.c:227 sw_perf_event_destroy+0x99/0x140 kernel/events/core.c:8285 _free_event+0x32c/0x1240 kernel/events/core.c:4459 put_event kernel/events/core.c:4553 [inline] perf_mmap_close+0x77f/0xf50 kernel/events/core.c:5556 remove_vma+0xa9/0x170 mm/mmap.c:176 remove_vma_list mm/mmap.c:2550 [inline] do_munmap+0x717/0xe10 mm/mmap.c:2786 mmap_region+0x1f1/0x1510 mm/mmap.c:1700 do_mmap+0x8e8/0x1080 mm/mmap.c:1530 do_mmap_pgoff include/linux/mm.h:2326 [inline] vm_mmap_pgoff+0x197/0x200 mm/util.c:357 ksys_mmap_pgoff+0x2d1/0x660 mm/mmap.c:1580 do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45de59 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f4048926c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000021200 RCX: 000000000045de59 RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000 RBP: 000000000118c0c8 R08: 0000000000000009 R09: 0000000000000000 R10: 0000000000000011 R11: 0000000000000246 R12: 000000000118c07c R13: 00007ffcceb2e26f R14: 00007f40489279c0 R15: 000000000118c07c overlayfs: failed to resolve './file0': -2 NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root overlayfs: unrecognized mount option "workdir=./file1" or missing value overlayfs: unrecognized mount option "workdir=./file1" or missing value NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root overlayfs: unrecognized mount option "lowworkdir=./fie1" or missing value NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) overlayfs: unrecognized mount option "lowworkdir=./fie1" or missing value NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root overlayfs: missing 'workdir' overlayfs: missing 'workdir' NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) overlayfs: unrecognized mount option "lowe{dir=./f+le1" or missing value NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root overlayfs: unrecognized mount option "lowe{dir=./f+le1" or missing value NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root NILFS (loop3): broken superblock, retrying with spare superblock (blocksize = 1024) NILFS (loop3): I/O error reading segment NILFS (loop3): error -5 while searching super root overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve './file1': -2 NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device kvm [12941]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc2 data 0x0 NILFS (loop3): couldn't find nilfs on the device overlayfs: failed to resolve './file05=6^֭e/}}jCxc0{eR"0WX8͘Ch!6"': -2 overlayfs: failed to resolve './file05=6^֭e/}}jCxc0{eR"0WX8͘Ch!6"': -2 NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device device lo left promiscuous mode overlayfs: failed to resolve './file0UEy@N9ѵ% V5>JR|tjF(%FQP&lBMJX+&C߸V|jݏ'ϜKW]g#vV`|?uP0z`b;ij_q': -2 overlayfs: failed to resolve './file0UEy@N9ѵ% V5>JR|tjF(%FQP&lBMJX+&C߸V|jݏ'ϜKW]g#vV`|?uP0z`b;ij_q': -2 NILFS (loop3): couldn't find nilfs on the device overlayfs: unrecognized mount option "Lowerdir=./bus" or missing value overlayfs: unrecognized mount option "Lowerdir=./bus" or missing value NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device kvm [13118]: vcpu0, guest rIP: 0xcc ignored wrmsr: 0x11e data 0xbe702111 NILFS (loop3): couldn't find nilfs on the device kvm [13118]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc1 data 0x0 kvm [13118]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc1 data 0x0 NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device kvm [13118]: vcpu0, guest rIP: 0xcc ignored wrmsr: 0x11e data 0xbe702111 kvm [13118]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc1 data 0x0 kvm [13118]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc1 data 0x0 NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device overlayfs: unrecognized mount option "lo" or missing value overlayfs: unrecognized mount option "lo" or missing value NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device NILFS (loop3): couldn't find nilfs on the device overlayfs: unrecognized mount option "lowerdir}C/bus" or missing value overlayfs: unrecognized mount option "lowerdir}C/bus" or missing value NILFS (loop3): couldn't find nilfs on the device caif:caif_disconnect_client(): nothing to disconnect NILFS (loop3): couldn't find nilfs on the device caif:caif_disconnect_client(): nothing to disconnect kvm [13319]: vcpu0, guest rIP: 0xcc disabled perfctr wrmsr: 0xc2 data 0x0