[ 38.844539] audit: type=1800 audit(1549029157.277:27): pid=7616 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 38.875514] audit: type=1800 audit(1549029157.277:28): pid=7616 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="ssh" dev="sda1" ino=2417 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [ 39.640252] sshd (7683) used greatest stack depth: 19480 bytes left [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 39.883168] audit: type=1800 audit(1549029158.387:29): pid=7616 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.224' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 49.370628] [ 49.372487] ====================================================== [ 49.378773] WARNING: possible circular locking dependency detected [ 49.385127] 5.0.0-rc4+ #55 Not tainted [ 49.388991] ------------------------------------------------------ [ 49.395438] syz-executor312/7769 is trying to acquire lock: [ 49.401367] 000000006b066941 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 49.409150] [ 49.409150] but task is already holding lock: [ 49.415089] 00000000c7bf5f71 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 49.424781] [ 49.424781] which lock already depends on the new lock. [ 49.424781] [ 49.433218] [ 49.433218] the existing dependency chain (in reverse order) is: [ 49.440812] [ 49.440812] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 49.447698] down_write+0x8a/0x130 [ 49.451737] shmem_fallocate+0x168/0x1200 [ 49.456623] ashmem_shrink_scan+0x239/0x630 [ 49.461443] ashmem_ioctl+0x38a/0x12c0 [ 49.465918] do_vfs_ioctl+0x107b/0x17d0 [ 49.470585] ksys_ioctl+0xab/0xd0 [ 49.474538] __x64_sys_ioctl+0x73/0xb0 [ 49.478922] do_syscall_64+0x1a3/0x800 [ 49.483461] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 49.489420] [ 49.489420] -> #1 (ashmem_mutex){+.+.}: [ 49.494850] __mutex_lock+0x12f/0x1670 [ 49.499229] mutex_lock_nested+0x16/0x20 [ 49.503781] ashmem_mmap+0x55/0x520 [ 49.507904] mmap_region+0xde5/0x1ca0 [ 49.512201] do_mmap+0xa09/0x1220 [ 49.516155] vm_mmap_pgoff+0x20b/0x2b0 [ 49.520543] ksys_mmap_pgoff+0x4f8/0x650 [ 49.525101] __x64_sys_mmap+0xe9/0x1b0 [ 49.529487] do_syscall_64+0x1a3/0x800 [ 49.534021] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 49.540232] [ 49.540232] -> #0 (&mm->mmap_sem){++++}: [ 49.545753] lock_acquire+0x1db/0x570 [ 49.550048] down_read+0x8d/0x120 [ 49.554001] __do_page_fault+0x9c2/0xd60 [ 49.558752] do_page_fault+0xe6/0x7d8 [ 49.563057] page_fault+0x1e/0x30 [ 49.567099] iov_iter_fault_in_readable+0x377/0x450 [ 49.572685] generic_perform_write+0x202/0x6b0 [ 49.577865] __generic_file_write_iter+0x25e/0x630 [ 49.583310] generic_file_write_iter+0x34e/0x6a0 [ 49.588561] __vfs_write+0x764/0xb40 [ 49.592892] vfs_write+0x20c/0x580 [ 49.596933] ksys_write+0x105/0x260 [ 49.601054] __x64_sys_write+0x73/0xb0 [ 49.605437] do_syscall_64+0x1a3/0x800 [ 49.609817] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 49.615492] [ 49.615492] other info that might help us debug this: [ 49.615492] [ 49.623858] Chain exists of: [ 49.623858] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 49.623858] [ 49.635365] Possible unsafe locking scenario: [ 49.635365] [ 49.641409] CPU0 CPU1 [ 49.646273] ---- ---- [ 49.650918] lock(&sb->s_type->i_mutex_key#11); [ 49.655647] lock(ashmem_mutex); [ 49.661591] lock(&sb->s_type->i_mutex_key#11); [ 49.668837] lock(&mm->mmap_sem); [ 49.672349] [ 49.672349] *** DEADLOCK *** [ 49.672349] [ 49.678381] 2 locks held by syz-executor312/7769: [ 49.683193] #0: 0000000098376d11 (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 49.690797] #1: 00000000c7bf5f71 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xe5/0x6a0 [ 49.700828] [ 49.700828] stack backtrace: [ 49.705408] CPU: 1 PID: 7769 Comm: syz-executor312 Not tainted 5.0.0-rc4+ #55 [ 49.712655] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 49.721983] Call Trace: [ 49.724548] dump_stack+0x1db/0x2d0 [ 49.728328] ? dump_stack_print_info.cold+0x20/0x20 [ 49.733369] ? print_stack_trace+0x77/0xb0 [ 49.737580] ? vprintk_func+0x86/0x189 [ 49.741441] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 49.746783] __lock_acquire+0x3014/0x4a30 [ 49.750917] ? mark_held_locks+0x100/0x100 [ 49.755523] ? shmem_getpage_gfp+0x197e/0x4b70 [ 49.760090] ? trace_hardirqs_off_caller+0x300/0x300 [ 49.765166] ? do_raw_spin_trylock+0x270/0x270 [ 49.769723] ? shmem_getpage_gfp+0x26fb/0x4b70 [ 49.774280] ? __lock_is_held+0xb6/0x140 [ 49.778317] lock_acquire+0x1db/0x570 [ 49.782094] ? __do_page_fault+0x9c2/0xd60 [ 49.786307] ? ___might_sleep+0x1e7/0x310 [ 49.790601] ? lock_release+0xc40/0xc40 [ 49.794899] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 49.799901] ? cmp_ex_search+0x8c/0xb0 [ 49.803919] down_read+0x8d/0x120 [ 49.807348] ? __do_page_fault+0x9c2/0xd60 [ 49.811658] ? __down_interruptible+0x740/0x740 [ 49.816480] ? do_writepages+0x1a0/0x1a0 [ 49.820712] ? set_page_dirty+0x5dd/0xfc0 [ 49.824838] __do_page_fault+0x9c2/0xd60 [ 49.829023] do_page_fault+0xe6/0x7d8 [ 49.832807] ? unlock_page+0x2b1/0x4a0 [ 49.836673] ? vmalloc_sync_all+0x30/0x30 [ 49.840794] ? balance_dirty_pages_ratelimited+0x1b0/0x2370 [ 49.846478] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 49.851382] page_fault+0x1e/0x30 [ 49.854819] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 49.860770] 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 [ 49.879648] RSP: 0018:ffff88808f1778a8 EFLAGS: 00010293 [ 49.884988] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020f22c3f [ 49.892423] RDX: 0000000000000000 RSI: ffffffff838e5807 RDI: 0000000000000007 [ 49.899762] RBP: ffff88808f177948 R08: ffff88809c59e440 R09: fffff94000460aff [ 49.907004] R10: fffff94000460afe R11: ffffea00023057f7 R12: 0000000000001000 [ 49.914247] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88808f177920 [ 49.921498] ? iov_iter_fault_in_readable+0x367/0x450 [ 49.926661] ? iov_iter_fault_in_readable+0x367/0x450 [ 49.931823] ? copy_page_from_iter+0x900/0x900 [ 49.936382] ? shmem_write_begin+0x105/0x1e0 [ 49.940767] ? shmem_write_begin+0x10f/0x1e0 [ 49.945319] generic_perform_write+0x202/0x6b0 [ 49.950063] ? add_page_wait_queue+0x480/0x480 [ 49.954757] ? current_time+0x1b0/0x1b0 [ 49.958902] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 49.964104] ? generic_write_check_limits+0x291/0x380 [ 49.969563] __generic_file_write_iter+0x25e/0x630 [ 49.974676] ? __fget+0x499/0x710 [ 49.978112] generic_file_write_iter+0x34e/0x6a0 [ 49.982848] ? __generic_file_write_iter+0x630/0x630 [ 49.987940] ? kfree+0xcf/0x230 [ 49.991207] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 49.996675] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 50.002187] ? iov_iter_init+0xea/0x220 [ 50.006142] __vfs_write+0x764/0xb40 [ 50.009834] ? kernel_read+0x120/0x120 [ 50.013851] ? rcu_read_lock_sched_held+0x110/0x130 [ 50.018850] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 50.023580] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 50.029412] ? __sb_start_write+0x1ac/0x360 [ 50.033822] vfs_write+0x20c/0x580 [ 50.037349] ksys_write+0x105/0x260 [ 50.040955] ? __ia32_sys_read+0xb0/0xb0 [ 50.044995] ? do_futex+0x2910/0x2910 [ 50.048769] ? trace_hardirqs_off_caller+0x300/0x300 [ 50.053846] ? trace_hardirqs_on_thunk+0x1a/0x1c [ 50.058576] __x64_sys_write+0x73/0xb0 [ 50.062442] do_syscall_64+0x1a3/0x800 [ 50.066450] ? syscall_return_slowpath+0x5f0/0x5f0 [ 50.071357] ? prepare_exit_to_usermode+0x232/0x3b0 [ 50.076348] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 50.081364] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 50.086668] RIP: 0033:0x4465e9 [ 50.089836] Code: e8 1c b4 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 [ 50.109052] RSP: 002b:00007fd00fe47ce8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 50.116821] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004465e9 executing program [ 50.124119] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 50.131367] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 50.138610] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 50.145854] R13: 00007ffc97d192ef R14: 00007fd00fe489c0 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program