Warning: Permanently added '10.128.0.17' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 27.879091] [ 27.880713] ====================================================== [ 27.887036] WARNING: possible circular locking dependency detected [ 27.893324] 4.14.242-syzkaller #0 Not tainted [ 27.897796] ------------------------------------------------------ [ 27.904084] syz-executor211/7947 is trying to acquire lock: [ 27.909762] (sb_writers#6){.+.+}, at: [] vfs_fallocate+0x5c1/0x790 [ 27.917710] [ 27.917710] but task is already holding lock: [ 27.923662] (ashmem_mutex){+.+.}, at: [] ashmem_ioctl+0x27e/0xd00 [ 27.931520] [ 27.931520] which lock already depends on the new lock. [ 27.931520] [ 27.939805] [ 27.939805] the existing dependency chain (in reverse order) is: [ 27.947396] [ 27.947396] -> #3 (ashmem_mutex){+.+.}: [ 27.952826] __mutex_lock+0xc4/0x1310 [ 27.957125] ashmem_mmap+0x50/0x5c0 [ 27.961246] mmap_region+0xa1a/0x1220 [ 27.965537] do_mmap+0x5b3/0xcb0 [ 27.969393] vm_mmap_pgoff+0x14e/0x1a0 [ 27.973769] SyS_mmap_pgoff+0x249/0x510 [ 27.978253] do_syscall_64+0x1d5/0x640 [ 27.982630] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 27.988320] [ 27.988320] -> #2 (&mm->mmap_sem){++++}: [ 27.993833] __might_fault+0x137/0x1b0 [ 27.998217] _copy_to_user+0x27/0xd0 [ 28.002425] filldir+0x1d5/0x390 [ 28.006281] dcache_readdir+0x180/0x860 [ 28.010744] iterate_dir+0x1a0/0x5e0 [ 28.014951] SyS_getdents+0x125/0x240 [ 28.019243] do_syscall_64+0x1d5/0x640 [ 28.023622] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.029299] [ 28.029299] -> #1 (&type->i_mutex_dir_key#5){++++}: [ 28.035780] down_write+0x34/0x90 [ 28.039729] path_openat+0xde2/0x2970 [ 28.044035] do_filp_open+0x179/0x3c0 [ 28.048329] do_sys_open+0x296/0x410 [ 28.052535] do_syscall_64+0x1d5/0x640 [ 28.056916] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.062602] [ 28.062602] -> #0 (sb_writers#6){.+.+}: [ 28.068033] lock_acquire+0x170/0x3f0 [ 28.072324] __sb_start_write+0x64/0x260 [ 28.076888] vfs_fallocate+0x5c1/0x790 [ 28.081270] ashmem_shrink_scan.part.0+0x135/0x3d0 [ 28.086689] ashmem_ioctl+0x294/0xd00 [ 28.090979] do_vfs_ioctl+0x75a/0xff0 [ 28.095269] SyS_ioctl+0x7f/0xb0 [ 28.099128] do_syscall_64+0x1d5/0x640 [ 28.103507] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.109190] [ 28.109190] other info that might help us debug this: [ 28.109190] [ 28.117302] Chain exists of: [ 28.117302] sb_writers#6 --> &mm->mmap_sem --> ashmem_mutex [ 28.117302] [ 28.127505] Possible unsafe locking scenario: [ 28.127505] [ 28.133532] CPU0 CPU1 [ 28.138168] ---- ---- [ 28.142814] lock(ashmem_mutex); [ 28.146238] lock(&mm->mmap_sem); [ 28.152265] lock(ashmem_mutex); [ 28.158205] lock(sb_writers#6); [ 28.161627] [ 28.161627] *** DEADLOCK *** [ 28.161627] [ 28.167657] 1 lock held by syz-executor211/7947: [ 28.172378] #0: (ashmem_mutex){+.+.}, at: [] ashmem_ioctl+0x27e/0xd00 [ 28.180671] [ 28.180671] stack backtrace: [ 28.185137] CPU: 1 PID: 7947 Comm: syz-executor211 Not tainted 4.14.242-syzkaller #0 [ 28.192985] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.202308] Call Trace: [ 28.204879] dump_stack+0x1b2/0x281 [ 28.208482] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.214258] __lock_acquire+0x2e0e/0x3f20 [ 28.218388] ? aa_file_perm+0x304/0xab0 [ 28.222338] ? __lock_acquire+0x5fc/0x3f20 [ 28.226543] ? trace_hardirqs_on+0x10/0x10 [ 28.230752] ? aa_path_link+0x3a0/0x3a0 [ 28.234707] ? trace_hardirqs_on+0x10/0x10 [ 28.238915] ? cache_alloc_refill+0x2fa/0x350 [ 28.243387] lock_acquire+0x170/0x3f0 [ 28.247169] ? vfs_fallocate+0x5c1/0x790 [ 28.251200] __sb_start_write+0x64/0x260 [ 28.255233] ? vfs_fallocate+0x5c1/0x790 [ 28.259282] ? shmem_evict_inode+0x8b0/0x8b0 [ 28.263672] vfs_fallocate+0x5c1/0x790 [ 28.267530] ashmem_shrink_scan.part.0+0x135/0x3d0 [ 28.272432] ? mutex_trylock+0x152/0x1a0 [ 28.276466] ? ashmem_ioctl+0x27e/0xd00 [ 28.280415] ashmem_ioctl+0x294/0xd00 [ 28.284204] ? userfaultfd_unmap_prep+0x450/0x450 [ 28.289021] ? ashmem_shrink_scan+0x80/0x80 [ 28.293317] ? lock_downgrade+0x740/0x740 [ 28.297452] ? ashmem_shrink_scan+0x80/0x80 [ 28.301748] do_vfs_ioctl+0x75a/0xff0 [ 28.305527] ? ioctl_preallocate+0x1a0/0x1a0 [ 28.309909] ? __fget+0x225/0x360 [ 28.313338] ? fput+0xb/0x140 [ 28.316416] ? SyS_mmap_pgoff+0x25e/0x510 [ 28.320535] ? security_file_ioctl+0x83/0xb0 [ 28.324915] SyS_ioctl+0x7f/0xb0 [ 28.328251] ? do_vfs_ioctl+0xff0/0xff0 [ 28.332204] do_syscall_64+0x1d5/0x640 [ 28.336121] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.341290] RIP: 0033:0x43eec9 [ 28.344487] RSP: 002b:00007ffd17020138 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 28.352166] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043eec9 [ 28.359411] RDX: 0000000000000000 RSI: 000000000000770a RDI: 0000000000000003 [ 28.366652] RBP: 0000000000402eb0 R08: 0000000000000000 R09: 0000000000000000 [ 28.373896] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402f40 [