Warning: Permanently added '10.128.0.160' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program syzkaller login: [ 38.555306] [ 38.555860] ====================================================== [ 38.557217] [ INFO: possible circular locking dependency detected ] [ 38.558381] 4.9.154+ #21 Not tainted [ 38.558993] ------------------------------------------------------- [ 38.560365] syz-executor676/2050 is trying to acquire lock: [ 38.561690] (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x7bd/0xa60 [ 38.563567] but task is already holding lock: [ 38.564669] (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 38.566893] which lock already depends on the new lock. [ 38.566893] [ 38.568730] [ 38.568730] the existing dependency chain (in reverse order) is: [ 38.570334] -> #2 (&sb->s_type->i_mutex_key#10){+.+.+.}: [ 38.572020] lock_acquire+0x133/0x3d0 [ 38.572985] down_write+0x41/0xa0 [ 38.573758] shmem_fallocate+0x143/0xab0 [ 38.574585] ashmem_shrink_scan+0x1c3/0x4c0 [ 38.576258] ashmem_ioctl+0x29b/0xdd0 [ 38.580562] do_vfs_ioctl+0xb87/0x11d0 [ 38.584973] SyS_ioctl+0x8f/0xc0 [ 38.588946] do_syscall_64+0x1ad/0x570 [ 38.593354] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.598966] -> #1 (ashmem_mutex){+.+.+.}: executing program [ 38.603785] lock_acquire+0x133/0x3d0 [ 38.608092] mutex_lock_nested+0xc7/0x920 [ 38.612752] ashmem_mmap+0x53/0x470 [ 38.616890] mmap_region+0x7e7/0xfa0 [ 38.621194] do_mmap+0x539/0xbc0 [ 38.625063] vm_mmap_pgoff+0x179/0x1c0 [ 38.629450] SyS_mmap_pgoff+0xfa/0x1b0 [ 38.633838] SyS_mmap+0x16/0x20 [ 38.637616] do_syscall_64+0x1ad/0x570 [ 38.642008] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.647612] -> #0 (&mm->mmap_sem){++++++}: executing program [ 38.652535] __lock_acquire+0x2d10/0x4350 [ 38.657202] lock_acquire+0x133/0x3d0 [ 38.661509] down_read+0x44/0xb0 [ 38.665382] __do_page_fault+0x7bd/0xa60 [ 38.669957] do_page_fault+0x28/0x30 [ 38.674172] page_fault+0x25/0x30 [ 38.678127] generic_perform_write+0x1b6/0x500 [ 38.683211] __generic_file_write_iter+0x340/0x530 [ 38.688644] generic_file_write_iter+0x38a/0x630 [ 38.694008] __vfs_write+0x3c1/0x560 [ 38.698236] vfs_write+0x185/0x520 [ 38.702276] SyS_write+0xdc/0x1c0 executing program [ 38.706232] do_syscall_64+0x1ad/0x570 [ 38.710625] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 38.716230] [ 38.716230] other info that might help us debug this: [ 38.716230] [ 38.724356] Chain exists of: &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#10 [ 38.734122] Possible unsafe locking scenario: [ 38.734122] [ 38.740243] CPU0 CPU1 [ 38.744887] ---- ---- [ 38.749544] lock(&sb->s_type->i_mutex_key#10); executing program executing program executing program [ 38.754658] lock(ashmem_mutex); [ 38.760880] lock(&sb->s_type->i_mutex_key#10); [ 38.768508] lock(&mm->mmap_sem); [ 38.772299] [ 38.772299] *** DEADLOCK *** [ 38.772299] [ 38.778360] 2 locks held by syz-executor676/2050: [ 38.783179] #0: (sb_writers#6){.+.+.+}, at: [] vfs_write+0x3e9/0x520 [ 38.792027] #1: (&sb->s_type->i_mutex_key#10){+.+.+.}, at: [] generic_file_write_iter+0x9a/0x630 [ 38.803301] executing program [ 38.803301] stack backtrace: [ 38.807787] CPU: 0 PID: 2050 Comm: syz-executor676 Not tainted 4.9.154+ #21 [ 38.814956] ffff8801ced4f5d8 ffffffff81b47411 ffffffff83cab180 ffffffff83cb47b0 [ 38.822982] ffffffff83cc8bb0 ffffffff8424cd40 ffff8801d28997c0 ffff8801ced4f630 [ 38.831136] ffffffff813ff088 dffffc0000000000 ffffffff84026080 ffff8801d289a0c0 [ 38.839206] Call Trace: [ 38.841787] [] dump_stack+0xc1/0x120 [ 38.847143] [] print_circular_bug.cold+0x2f6/0x454 executing program [ 38.853713] [] __lock_acquire+0x2d10/0x4350 [ 38.859695] [] ? kasan_unpoison_shadow+0x35/0x50 [ 38.866083] [] ? kasan_alloc_pages+0x38/0x40 [ 38.872125] [] ? trace_hardirqs_on+0x10/0x10 [ 38.878166] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 38.884987] [] lock_acquire+0x133/0x3d0 [ 38.890596] [] ? __do_page_fault+0x7bd/0xa60 [ 38.896642] [] down_read+0x44/0xb0 executing program [ 38.901817] [] ? __do_page_fault+0x7bd/0xa60 [ 38.907865] [] __do_page_fault+0x7bd/0xa60 [ 38.913740] [] ? debug_lockdep_rcu_enabled+0x71/0xa0 [ 38.920483] [] ? bad_area_access_error+0x3d0/0x3d0 [ 38.927076] [] ? mark_held_locks+0xb1/0x100 [ 38.933032] [] ? shmem_getpage_gfp+0x9dd/0x1b00 [ 38.939334] [] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 38.945983] [] do_page_fault+0x28/0x30 [ 38.951711] [] page_fault+0x25/0x30 executing program executing program executing program [ 38.956991] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 38.963989] [] ? iov_iter_fault_in_readable+0x30d/0x3d0 [ 38.970989] [] ? iov_iter_fault_in_readable+0x300/0x3d0 [ 38.977985] [] ? iov_iter_init+0x1d0/0x1d0 [ 38.983962] [] generic_perform_write+0x1b6/0x500 [ 38.990352] [] ? filemap_page_mkwrite+0x280/0x280 [ 38.996828] [] ? current_time+0xd0/0xd0 executing program [ 39.002435] [] __generic_file_write_iter+0x340/0x530 [ 39.009176] [] generic_file_write_iter+0x38a/0x630 [ 39.015747] [] __vfs_write+0x3c1/0x560 [ 39.021267] [] ? bpf_fd_pass+0x270/0x270 [ 39.027208] [] ? __vfs_read+0x550/0x550 [ 39.032818] [] ? rcu_read_lock_sched_held+0x10b/0x130 [ 39.039646] [] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 39.046212] [] ? __sb_start_write+0x161/0x310 [ 39.052352] [] vfs_write+0x185/0x520 executing program executing program executing program executing program [ 39.057704] [] SyS_write+0xdc/0x1c0 [ 39.062965] [] ? SyS_read+0x1c0/0x1c0 [ 39.068395] [] ? do_syscall_64+0x4a/0x570 [ 39.074196] [] ? SyS_read+0x1c0/0x1c0 [ 39.079648] [] do_syscall_64+0x1ad/0x570 [ 39.085358] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb 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 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 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program