[ 34.747100] audit: type=1800 audit(1550843132.125:27): pid=7392 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 34.766140] audit: type=1800 audit(1550843132.125:28): pid=7392 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. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. [ 35.550515] audit: type=1800 audit(1550843132.995:29): pid=7392 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 35.569264] audit: type=1800 audit(1550843132.995:30): pid=7392 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rmnologin" dev="sda1" ino=2423 res=0 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.38' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 44.396005] hrtimer: interrupt took 45763 ns [ 44.505431] [ 44.507092] ====================================================== [ 44.513403] WARNING: possible circular locking dependency detected [ 44.519714] 5.0.0-rc7+ #82 Not tainted [ 44.523605] ------------------------------------------------------ [ 44.529922] syz-executor443/7546 is trying to acquire lock: [ 44.535628] 000000002c294172 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 44.543439] [ 44.543439] but task is already holding lock: [ 44.549404] 00000000aff3c791 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 44.559037] [ 44.559037] which lock already depends on the new lock. [ 44.559037] [ 44.567342] [ 44.567342] the existing dependency chain (in reverse order) is: [ 44.574956] [ 44.574956] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 44.581727] down_write+0x38/0x90 [ 44.585714] shmem_fallocate+0x15a/0xc60 [ 44.590312] ashmem_shrink_scan+0x1d7/0x4f0 [ 44.595157] ashmem_ioctl+0x2f0/0x11a0 [ 44.599565] do_vfs_ioctl+0xd6e/0x1390 [ 44.603974] ksys_ioctl+0xab/0xd0 [ 44.607947] __x64_sys_ioctl+0x73/0xb0 [ 44.612357] do_syscall_64+0x103/0x610 [ 44.616778] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.622482] [ 44.622482] -> #1 (ashmem_mutex){+.+.}: [ 44.627945] __mutex_lock+0xf7/0x1310 [ 44.632269] mutex_lock_nested+0x16/0x20 [ 44.636853] ashmem_mmap+0x55/0x520 [ 44.641001] mmap_region+0xc37/0x1760 [ 44.645321] do_mmap+0x8e2/0x1080 [ 44.649296] vm_mmap_pgoff+0x1c5/0x230 [ 44.653705] ksys_mmap_pgoff+0x4aa/0x630 [ 44.658297] __x64_sys_mmap+0xe9/0x1b0 [ 44.662705] do_syscall_64+0x103/0x610 [ 44.667111] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.672799] [ 44.672799] -> #0 (&mm->mmap_sem){++++}: [ 44.678330] lock_acquire+0x16f/0x3f0 [ 44.682637] down_read+0x3b/0x90 [ 44.686513] __do_page_fault+0x9c2/0xd60 [ 44.691080] do_page_fault+0x71/0x581 [ 44.695389] page_fault+0x1e/0x30 [ 44.699373] iov_iter_fault_in_readable+0x377/0x450 [ 44.705238] generic_perform_write+0x195/0x530 [ 44.710331] __generic_file_write_iter+0x25e/0x630 [ 44.715768] generic_file_write_iter+0x360/0x610 [ 44.721028] __vfs_write+0x613/0x8e0 [ 44.725371] vfs_write+0x20c/0x580 [ 44.729420] ksys_write+0xea/0x1f0 [ 44.733482] __x64_sys_write+0x73/0xb0 [ 44.737884] do_syscall_64+0x103/0x610 [ 44.742283] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 44.747977] [ 44.747977] other info that might help us debug this: [ 44.747977] [ 44.756100] Chain exists of: [ 44.756100] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 44.756100] [ 44.767621] Possible unsafe locking scenario: [ 44.767621] [ 44.773658] CPU0 CPU1 [ 44.778307] ---- ---- [ 44.782957] lock(&sb->s_type->i_mutex_key#11); [ 44.787699] lock(ashmem_mutex); [ 44.793667] lock(&sb->s_type->i_mutex_key#11); [ 44.800924] lock(&mm->mmap_sem); [ 44.804448] [ 44.804448] *** DEADLOCK *** [ 44.804448] [ 44.810490] 2 locks held by syz-executor443/7546: [ 44.815314] #0: 000000003fdabbab (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 44.822932] #1: 00000000aff3c791 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 44.832978] [ 44.832978] stack backtrace: [ 44.837460] CPU: 1 PID: 7546 Comm: syz-executor443 Not tainted 5.0.0-rc7+ #82 [ 44.844714] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 44.854064] Call Trace: [ 44.856645] dump_stack+0x172/0x1f0 [ 44.860259] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 44.865611] __lock_acquire+0x2f00/0x4700 [ 44.869763] ? mark_held_locks+0x100/0x100 [ 44.873987] ? mark_held_locks+0x100/0x100 [ 44.878206] ? __lock_is_held+0xb6/0x140 [ 44.882257] lock_acquire+0x16f/0x3f0 [ 44.886048] ? __do_page_fault+0x9c2/0xd60 [ 44.890272] down_read+0x3b/0x90 [ 44.893624] ? __do_page_fault+0x9c2/0xd60 [ 44.897845] __do_page_fault+0x9c2/0xd60 [ 44.901898] do_page_fault+0x71/0x581 [ 44.905683] page_fault+0x1e/0x30 [ 44.909127] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 44.914911] Code: 89 f6 41 88 57 e0 e8 b8 2b 47 fe 45 85 f6 74 c1 e9 70 fe ff ff e8 29 2a 47 fe 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 85 2b 47 fe 85 db [ 44.933799] RSP: 0018:ffff8880a3ed79b8 EFLAGS: 00010293 [ 44.939170] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e3f53f [ 44.946431] RDX: 0000000000000000 RSI: ffffffff8328b757 RDI: 0000000000000007 [ 44.953686] RBP: ffff8880a3ed7a58 R08: ffff8880a1796300 R09: fffff94000445f67 [ 44.960949] R10: fffff94000445f66 R11: ffffea000222fb37 R12: 0000000000001000 [ 44.968202] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880a3ed7a30 [ 44.975468] ? iov_iter_fault_in_readable+0x367/0x450 [ 44.980647] ? iov_iter_fault_in_readable+0x367/0x450 [ 44.985822] ? copy_page_from_iter+0x750/0x750 [ 44.990393] generic_perform_write+0x195/0x530 [ 44.994964] ? page_endio+0x780/0x780 [ 44.998751] ? current_time+0x140/0x140 [ 45.002727] ? lock_acquire+0x1ea/0x3f0 [ 45.006687] __generic_file_write_iter+0x25e/0x630 [ 45.011616] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 45.016619] generic_file_write_iter+0x360/0x610 [ 45.021361] ? __generic_file_write_iter+0x630/0x630 [ 45.026449] ? __fget+0x340/0x540 [ 45.029889] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 45.035409] ? iov_iter_init+0xea/0x220 [ 45.039395] __vfs_write+0x613/0x8e0 [ 45.043094] ? kernel_read+0x120/0x120 [ 45.046972] ? rcu_read_lock_sched_held+0x110/0x130 [ 45.051976] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 45.056730] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 45.062255] ? __sb_start_write+0x1ac/0x360 [ 45.066564] vfs_write+0x20c/0x580 [ 45.070089] ksys_write+0xea/0x1f0 [ 45.073640] ? __ia32_sys_read+0xb0/0xb0 [ 45.077690] ? do_syscall_64+0x26/0x610 [ 45.081669] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 45.087017] ? do_syscall_64+0x26/0x610 [ 45.090982] __x64_sys_write+0x73/0xb0 [ 45.094858] do_syscall_64+0x103/0x610 [ 45.098737] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 45.103909] RIP: 0033:0x4469a9 [ 45.107088] Code: e8 bc b9 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 fb 07 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 45.125975] RSP: 002b:00007f7bedf8edb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 45.133666] RAX: ffffffffffffffda RBX: 00000000006dcc28 RCX: 00000000004469a9 [ 45.140920] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000005 [ 45.148199] RBP: 00000000006dcc20 R08: 0000000000000000 R09: 0000000000000000 [ 45.155571] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c [ 45.162826] R13: 00007ffe47da6d2f R14: 00007f7bedf8f9c0 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