====================================================== WARNING: possible circular locking dependency detected 4.14.131+ #13 Not tainted ------------------------------------------------------ syz-executor.2/18125 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000b889ece6>] get_online_cpus include/linux/cpu.h:140 [inline] (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000b889ece6>] lru_add_drain_all+0xa/0x20 mm/swap.c:729 but task is already holding lock: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<000000008607751a>] inode_lock include/linux/fs.h:718 [inline] (&sb->s_type->i_mutex_key#10){+.+.}, at: [<000000008607751a>] shmem_add_seals+0x12b/0x1150 mm/shmem.c:2829 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&sb->s_type->i_mutex_key#10){+.+.}: -> #4 (ashmem_mutex){+.+.}: -> #3 (&mm->mmap_sem){++++}: -> #2 (&cpuctx_mutex){+.+.}: -> #1 (pmus_lock){+.+.}: -> #0 (cpu_hotplug_lock.rw_sem){++++}: other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#10); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 1 lock held by syz-executor.2/18125: #0: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<000000008607751a>] inode_lock include/linux/fs.h:718 [inline] #0: (&sb->s_type->i_mutex_key#10){+.+.}, at: [<000000008607751a>] shmem_add_seals+0x12b/0x1150 mm/shmem.c:2829 stack backtrace: CPU: 1 PID: 18125 Comm: syz-executor.2 Not tainted 4.14.131+ #13 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 print_req_error: I/O error, dev loop4, sector 0 print_req_error: I/O error, dev loop4, sector 392 Buffer I/O error on dev loop4, logical block 49, lost async page write print_req_error: I/O error, dev loop4, sector 256 Buffer I/O error on dev loop4, logical block 32, lost async page write print_req_error: I/O error, dev loop4, sector 136 Buffer I/O error on dev loop4, logical block 17, lost async page write print_req_error: I/O error, dev loop4, sector 304 Buffer I/O error on dev loop4, logical block 38, lost async page write print_req_error: I/O error, dev loop4, sector 208 Buffer I/O error on dev loop4, logical block 26, lost async page write print_req_error: I/O error, dev loop4, sector 384 Buffer I/O error on dev loop4, logical block 48, lost async page write print_req_error: I/O error, dev loop4, sector 256 Buffer I/O error on dev loop4, logical block 32, lost async page write print_req_error: I/O error, dev loop4, sector 768 Buffer I/O error on dev loop4, logical block 96, lost async page write print_req_error: I/O error, dev loop4, sector 256 Buffer I/O error on dev loop4, logical block 32, lost async page write print_req_error: I/O error, dev loop4, sector 256 Buffer I/O error on dev loop4, logical block 32, lost async page write