Warning: Permanently added '10.128.0.84' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 57.620881] [ 57.622560] ====================================================== [ 57.628856] WARNING: possible circular locking dependency detected [ 57.635152] 5.0.0-rc4+ #55 Not tainted [ 57.639064] ------------------------------------------------------ [ 57.645387] syz-executor056/8093 is trying to acquire lock: [ 57.651086] 000000009f0c249a (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 57.658886] [ 57.658886] but task is already holding lock: [ 57.664834] 00000000c04ead3e (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 57.674442] [ 57.674442] which lock already depends on the new lock. [ 57.674442] [ 57.682759] [ 57.682759] the existing dependency chain (in reverse order) is: [ 57.690363] [ 57.690363] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 57.697107] down_write+0x8a/0x130 [ 57.701153] shmem_fallocate+0x168/0x1200 [ 57.705819] ashmem_shrink_scan+0x239/0x630 [ 57.710664] ashmem_ioctl+0x38a/0x12c0 [ 57.715069] do_vfs_ioctl+0x107b/0x17d0 [ 57.719568] ksys_ioctl+0xab/0xd0 [ 57.723539] __x64_sys_ioctl+0x73/0xb0 [ 57.727932] do_syscall_64+0x1a3/0x800 [ 57.732324] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.738010] [ 57.738010] -> #1 (ashmem_mutex){+.+.}: [ 57.743446] __mutex_lock+0x12f/0x1670 [ 57.747837] mutex_lock_nested+0x16/0x20 [ 57.752402] ashmem_mmap+0x55/0x520 [ 57.756533] mmap_region+0xde5/0x1ca0 [ 57.760836] do_mmap+0xa09/0x1220 [ 57.764793] vm_mmap_pgoff+0x20b/0x2b0 [ 57.769183] ksys_mmap_pgoff+0x4f8/0x650 [ 57.773751] __x64_sys_mmap+0xe9/0x1b0 [ 57.778160] do_syscall_64+0x1a3/0x800 [ 57.782553] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.788265] [ 57.788265] -> #0 (&mm->mmap_sem){++++}: [ 57.793802] lock_acquire+0x1db/0x570 [ 57.798104] down_read+0x8d/0x120 [ 57.802074] __do_page_fault+0x9c2/0xd60 [ 57.806647] do_page_fault+0xe6/0x7d8 [ 57.810969] page_fault+0x1e/0x30 [ 57.814927] iov_iter_fault_in_readable+0x377/0x450 [ 57.820472] generic_perform_write+0x202/0x6b0 [ 57.825562] __generic_file_write_iter+0x25e/0x630 [ 57.831003] generic_file_write_iter+0x34e/0x6a0 [ 57.836262] __vfs_write+0x764/0xb40 [ 57.840475] vfs_write+0x20c/0x580 [ 57.844535] ksys_write+0x105/0x260 [ 57.848663] __x64_sys_write+0x73/0xb0 [ 57.853054] do_syscall_64+0x1a3/0x800 [ 57.857464] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 57.863150] [ 57.863150] other info that might help us debug this: [ 57.863150] [ 57.871266] Chain exists of: [ 57.871266] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 57.871266] [ 57.882784] Possible unsafe locking scenario: [ 57.882784] [ 57.888818] CPU0 CPU1 [ 57.893464] ---- ---- [ 57.898115] lock(&sb->s_type->i_mutex_key#12); [ 57.902851] lock(ashmem_mutex); [ 57.908799] lock(&sb->s_type->i_mutex_key#12); [ 57.916051] lock(&mm->mmap_sem); [ 57.919583] [ 57.919583] *** DEADLOCK *** [ 57.919583] [ 57.925636] 2 locks held by syz-executor056/8093: [ 57.930461] #0: 00000000ef40b124 (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 57.938101] #1: 00000000c04ead3e (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 57.948158] [ 57.948158] stack backtrace: [ 57.952634] CPU: 1 PID: 8093 Comm: syz-executor056 Not tainted 5.0.0-rc4+ #55 [ 57.959883] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 57.969214] Call Trace: [ 57.971793] dump_stack+0x1db/0x2d0 [ 57.975405] ? dump_stack_print_info.cold+0x20/0x20 [ 57.980426] ? print_stack_trace+0x77/0xb0 [ 57.984669] ? vprintk_func+0x86/0x189 [ 57.988542] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 57.993885] __lock_acquire+0x3014/0x4a30 [ 57.998021] ? mark_held_locks+0x100/0x100 [ 58.002244] ? shmem_getpage_gfp+0x197e/0x4b70 [ 58.006826] ? trace_hardirqs_off_caller+0x300/0x300 [ 58.011912] ? do_raw_spin_trylock+0x270/0x270 [ 58.016481] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 58.021051] ? __lock_is_held+0xb6/0x140 [ 58.025094] lock_acquire+0x1db/0x570 [ 58.028879] ? __do_page_fault+0x9c2/0xd60 [ 58.033098] ? ___might_sleep+0x1e7/0x310 [ 58.037247] ? lock_release+0xc40/0xc40 [ 58.041227] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 58.046240] ? cmp_ex_search+0x8c/0xb0 [ 58.050143] down_read+0x8d/0x120 [ 58.053578] ? __do_page_fault+0x9c2/0xd60 [ 58.057810] ? __down_interruptible+0x740/0x740 [ 58.062462] ? do_writepages+0x1a0/0x1a0 [ 58.066513] ? set_page_dirty+0x5dd/0xfc0 [ 58.070646] __do_page_fault+0x9c2/0xd60 [ 58.074694] do_page_fault+0xe6/0x7d8 [ 58.078477] ? unlock_page+0x2b1/0x4a0 [ 58.082349] ? vmalloc_sync_all+0x30/0x30 [ 58.086485] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 58.092201] ? retint_kernel+0x2d/0x2d [ 58.096094] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 58.100919] page_fault+0x1e/0x30 [ 58.104385] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 58.110163] Code: 89 f6 41 88 57 e0 e8 e8 ad f3 fd 45 85 f6 74 c1 e9 70 fe ff ff e8 59 ac f3 fd 0f 1f 00 0f ae e8 44 89 f0 48 8b 8d 68 ff ff ff <8a> 11 89 c3 0f 1f 00 41 88 57 d0 31 ff 89 de e8 b5 ad f3 fd 85 db [ 58.129062] RSP: 0018:ffff88808aaaf8a8 EFLAGS: 00010293 [ 58.134406] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e30c3f [ 58.141658] RDX: 0000000000000000 RSI: ffffffff838e5807 RDI: 0000000000000007 [ 58.148905] RBP: ffff88808aaaf948 R08: ffff88808fa4e600 R09: fffff94000423baf [ 58.156178] R10: fffff94000423bae R11: ffffea000211dd77 R12: 0000000000001000 [ 58.163429] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88808aaaf920 [ 58.170699] ? iov_iter_fault_in_readable+0x367/0x450 [ 58.175905] ? iov_iter_fault_in_readable+0x367/0x450 [ 58.181079] ? copy_page_from_iter+0x900/0x900 [ 58.185646] ? shmem_write_begin+0x105/0x1e0 [ 58.190037] ? shmem_write_begin+0x10f/0x1e0 [ 58.194428] generic_perform_write+0x202/0x6b0 [ 58.198997] ? add_page_wait_queue+0x480/0x480 [ 58.203562] ? current_time+0x1b0/0x1b0 [ 58.207528] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 58.212532] ? generic_write_check_limits+0x291/0x380 [ 58.217727] __generic_file_write_iter+0x25e/0x630 [ 58.222638] ? __fget+0x499/0x710 [ 58.226076] generic_file_write_iter+0x34e/0x6a0 [ 58.230816] ? __generic_file_write_iter+0x630/0x630 [ 58.235902] ? kfree+0xcf/0x230 [ 58.239162] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.244506] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 58.250024] ? iov_iter_init+0xea/0x220 [ 58.254011] __vfs_write+0x764/0xb40 [ 58.257709] ? kernel_read+0x120/0x120 [ 58.261590] ? rcu_read_lock_sched_held+0x110/0x130 [ 58.266599] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 58.271345] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 58.276881] ? __sb_start_write+0x1ac/0x360 [ 58.281188] vfs_write+0x20c/0x580 [ 58.284728] ksys_write+0x105/0x260 [ 58.288380] ? __ia32_sys_read+0xb0/0xb0 [ 58.292453] ? do_futex+0x2910/0x2910 [ 58.296254] ? trace_hardirqs_off_caller+0x300/0x300 [ 58.301352] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 58.306089] __x64_sys_write+0x73/0xb0 [ 58.309962] do_syscall_64+0x1a3/0x800 [ 58.313835] ? syscall_return_slowpath+0x5f0/0x5f0 [ 58.318756] ? prepare_exit_to_usermode+0x232/0x3b0 [ 58.323760] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 58.328600] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.333797] RIP: 0033:0x4463d9 [ 58.336973] Code: e8 2c b3 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 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 2b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 58.355853] RSP: 002b:00007fcb2406eda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 58.363539] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004463d9 executing program [ 58.370790] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 58.378049] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 58.385323] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 58.392582] R13: 0000000000000000 R14: 0080000080000000 R15: 20c49ba5e353f7cf executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program