[ 38.051541] audit: type=1800 audit(1549181200.653:27): pid=7567 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 38.077325] audit: type=1800 audit(1549181200.653:28): pid=7567 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. [ 38.917253] audit: type=1800 audit(1549181201.573:29): pid=7567 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 38.936094] audit: type=1800 audit(1549181201.573:30): pid=7567 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.168' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 47.145342] [ 47.147023] ====================================================== [ 47.153333] WARNING: possible circular locking dependency detected [ 47.159649] 5.0.0-rc4+ #58 Not tainted [ 47.163520] ------------------------------------------------------ [ 47.169823] syz-executor490/7725 is trying to acquire lock: [ 47.175528] 000000005d06bb3b (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 47.183332] [ 47.183332] but task is already holding lock: [ 47.189286] 00000000e7af72fa (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 47.198903] [ 47.198903] which lock already depends on the new lock. [ 47.198903] [ 47.207202] [ 47.207202] the existing dependency chain (in reverse order) is: [ 47.214804] [ 47.214804] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 47.221591] down_write+0x38/0x90 [ 47.225576] shmem_fallocate+0x15a/0xc60 [ 47.230162] ashmem_shrink_scan+0x1d7/0x4f0 [ 47.234993] ashmem_ioctl+0x2f0/0x11a0 [ 47.239390] do_vfs_ioctl+0xd6e/0x1390 [ 47.243786] ksys_ioctl+0xab/0xd0 [ 47.247755] __x64_sys_ioctl+0x73/0xb0 [ 47.252168] do_syscall_64+0x103/0x610 [ 47.256569] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.262262] [ 47.262262] -> #1 (ashmem_mutex){+.+.}: [ 47.267708] __mutex_lock+0xf7/0x1310 [ 47.272029] mutex_lock_nested+0x16/0x20 [ 47.276621] ashmem_mmap+0x55/0x520 [ 47.280760] mmap_region+0xc37/0x1760 [ 47.285068] do_mmap+0x8e2/0x1080 [ 47.289032] vm_mmap_pgoff+0x1c5/0x230 [ 47.293431] ksys_mmap_pgoff+0x4aa/0x630 [ 47.297999] __x64_sys_mmap+0xe9/0x1b0 [ 47.302397] do_syscall_64+0x103/0x610 [ 47.306794] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.312485] [ 47.312485] -> #0 (&mm->mmap_sem){++++}: [ 47.318017] lock_acquire+0x16f/0x3f0 [ 47.322328] down_read+0x3b/0x90 [ 47.326205] __do_page_fault+0x9c2/0xd60 [ 47.330777] do_page_fault+0x71/0x581 [ 47.335088] page_fault+0x1e/0x30 [ 47.339053] iov_iter_fault_in_readable+0x377/0x450 [ 47.344578] generic_perform_write+0x195/0x530 [ 47.349692] __generic_file_write_iter+0x25e/0x630 [ 47.355181] generic_file_write_iter+0x360/0x610 [ 47.360449] __vfs_write+0x613/0x8e0 [ 47.364671] vfs_write+0x20c/0x580 [ 47.368718] ksys_write+0xea/0x1f0 [ 47.372770] __x64_sys_write+0x73/0xb0 [ 47.377172] do_syscall_64+0x103/0x610 [ 47.381569] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.387259] [ 47.387259] other info that might help us debug this: [ 47.387259] [ 47.395381] Chain exists of: [ 47.395381] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 47.395381] [ 47.406900] Possible unsafe locking scenario: [ 47.406900] [ 47.412940] CPU0 CPU1 [ 47.417649] ---- ---- [ 47.422303] lock(&sb->s_type->i_mutex_key#11); [ 47.427059] lock(ashmem_mutex); [ 47.433018] lock(&sb->s_type->i_mutex_key#11); [ 47.440279] lock(&mm->mmap_sem); [ 47.443848] [ 47.443848] *** DEADLOCK *** [ 47.443848] [ 47.449899] 2 locks held by syz-executor490/7725: [ 47.454723] #0: 00000000e1b23a2e (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 47.462344] #1: 00000000e7af72fa (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 47.472396] [ 47.472396] stack backtrace: [ 47.476900] CPU: 0 PID: 7725 Comm: syz-executor490 Not tainted 5.0.0-rc4+ #58 [ 47.484169] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 47.493509] Call Trace: [ 47.496101] dump_stack+0x172/0x1f0 [ 47.499720] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 47.505072] __lock_acquire+0x2f00/0x4700 [ 47.509220] ? mark_held_locks+0x100/0x100 [ 47.513453] ? mark_held_locks+0x100/0x100 [ 47.517677] ? __lock_is_held+0xb6/0x140 [ 47.521728] lock_acquire+0x16f/0x3f0 [ 47.525521] ? __do_page_fault+0x9c2/0xd60 [ 47.529755] down_read+0x3b/0x90 [ 47.533112] ? __do_page_fault+0x9c2/0xd60 [ 47.537338] __do_page_fault+0x9c2/0xd60 [ 47.541395] do_page_fault+0x71/0x581 [ 47.545183] page_fault+0x1e/0x30 [ 47.548638] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 47.554425] 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 [ 47.573313] RSP: 0018:ffff888091e079b8 EFLAGS: 00010293 [ 47.578664] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e1ec3f [ 47.585923] RDX: 0000000000000000 RSI: ffffffff8328b1e7 RDI: 0000000000000007 [ 47.593182] RBP: ffff888091e07a58 R08: ffff8880a8ed6140 R09: fffff9400041a407 [ 47.600472] R10: fffff9400041a406 R11: ffffea00020d2037 R12: 0000000000001000 [ 47.607819] R13: 0000000000001000 R14: 0000000000000000 R15: ffff888091e07a30 [ 47.615120] ? iov_iter_fault_in_readable+0x367/0x450 [ 47.620312] ? iov_iter_fault_in_readable+0x367/0x450 [ 47.625489] ? copy_page_from_iter+0x750/0x750 [ 47.630061] generic_perform_write+0x195/0x530 [ 47.634644] ? page_endio+0x780/0x780 [ 47.638435] ? current_time+0x140/0x140 [ 47.642402] ? lock_acquire+0x16f/0x3f0 [ 47.646415] __generic_file_write_iter+0x25e/0x630 [ 47.651335] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 47.656343] generic_file_write_iter+0x360/0x610 [ 47.661091] ? __generic_file_write_iter+0x630/0x630 [ 47.666183] ? __fget+0x340/0x540 [ 47.669642] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 47.675168] ? iov_iter_init+0xea/0x220 [ 47.679134] __vfs_write+0x613/0x8e0 [ 47.682898] ? kernel_read+0x120/0x120 [ 47.686790] ? rcu_read_lock_sched_held+0x110/0x130 [ 47.691807] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 47.696551] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 47.702078] ? __sb_start_write+0x1ac/0x360 [ 47.706390] vfs_write+0x20c/0x580 [ 47.709921] ksys_write+0xea/0x1f0 [ 47.713452] ? __ia32_sys_read+0xb0/0xb0 [ 47.717506] ? do_syscall_64+0x26/0x610 [ 47.721471] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.726872] ? do_syscall_64+0x26/0x610 [ 47.730891] __x64_sys_write+0x73/0xb0 [ 47.734776] do_syscall_64+0x103/0x610 [ 47.738766] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 47.743942] RIP: 0033:0x4463e9 [ 47.747122] 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 [ 47.766010] RSP: 002b:00007f57570bfda8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 47.773715] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004463e9 [ 47.780985] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 47.788279] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 executing program [ 47.795543] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 47.802812] 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program