[ 34.240504] audit: type=1800 audit(1549175749.578:27): pid=7396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 34.260779] audit: type=1800 audit(1549175749.578:28): pid=7396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined 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.179363] audit: type=1800 audit(1549175750.578:29): pid=7396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 35.198740] audit: type=1800 audit(1549175750.578:30): pid=7396 uid=0 auid=4294967295 ses=4294967295 subj==unconfined 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.43' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 43.309902] [ 43.311645] ====================================================== [ 43.317933] WARNING: possible circular locking dependency detected [ 43.324226] 5.0.0-rc4+ #58 Not tainted [ 43.328088] ------------------------------------------------------ [ 43.334388] syz-executor556/7550 is trying to acquire lock: [ 43.340067] 00000000bfa99627 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 43.347845] [ 43.347845] but task is already holding lock: [ 43.353785] 000000000859b047 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 43.363384] [ 43.363384] which lock already depends on the new lock. [ 43.363384] [ 43.371672] [ 43.371672] the existing dependency chain (in reverse order) is: [ 43.379403] [ 43.379403] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 43.386144] down_write+0x38/0x90 [ 43.390095] shmem_fallocate+0x15a/0xc60 [ 43.394652] ashmem_shrink_scan+0x1d7/0x4f0 [ 43.399467] ashmem_ioctl+0x2f0/0x11a0 [ 43.403857] do_vfs_ioctl+0xd6e/0x1390 [ 43.408238] ksys_ioctl+0xab/0xd0 [ 43.412205] __x64_sys_ioctl+0x73/0xb0 [ 43.416600] do_syscall_64+0x103/0x610 [ 43.420991] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.426758] [ 43.426758] -> #1 (ashmem_mutex){+.+.}: [ 43.432193] __mutex_lock+0xf7/0x1310 [ 43.436486] mutex_lock_nested+0x16/0x20 [ 43.441039] ashmem_mmap+0x55/0x520 [ 43.445161] mmap_region+0xc37/0x1760 [ 43.449455] do_mmap+0x8e2/0x1080 [ 43.453403] vm_mmap_pgoff+0x1c5/0x230 [ 43.457784] ksys_mmap_pgoff+0x4aa/0x630 [ 43.462341] __x64_sys_mmap+0xe9/0x1b0 [ 43.466741] do_syscall_64+0x103/0x610 [ 43.471124] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.476803] [ 43.476803] -> #0 (&mm->mmap_sem){++++}: [ 43.482340] lock_acquire+0x16f/0x3f0 [ 43.486647] down_read+0x3b/0x90 [ 43.490514] __do_page_fault+0x9c2/0xd60 [ 43.495073] do_page_fault+0x71/0x581 [ 43.499373] page_fault+0x1e/0x30 [ 43.503323] iov_iter_fault_in_readable+0x377/0x450 [ 43.508837] generic_perform_write+0x195/0x530 [ 43.513926] __generic_file_write_iter+0x25e/0x630 [ 43.519354] generic_file_write_iter+0x360/0x610 [ 43.524602] __vfs_write+0x613/0x8e0 [ 43.528806] vfs_write+0x20c/0x580 [ 43.532840] ksys_write+0xea/0x1f0 [ 43.536882] __x64_sys_write+0x73/0xb0 [ 43.541270] do_syscall_64+0x103/0x610 [ 43.545651] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.551327] [ 43.551327] other info that might help us debug this: [ 43.551327] [ 43.559437] Chain exists of: [ 43.559437] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 43.559437] [ 43.570941] Possible unsafe locking scenario: [ 43.570941] [ 43.576973] CPU0 CPU1 [ 43.581610] ---- ---- [ 43.586246] lock(&sb->s_type->i_mutex_key#12); [ 43.590972] lock(ashmem_mutex); [ 43.596914] lock(&sb->s_type->i_mutex_key#12); [ 43.604158] lock(&mm->mmap_sem); [ 43.607666] [ 43.607666] *** DEADLOCK *** [ 43.607666] [ 43.613699] 2 locks held by syz-executor556/7550: [ 43.618510] #0: 00000000ddf82834 (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 43.626125] #1: 000000000859b047 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 43.636157] [ 43.636157] stack backtrace: [ 43.640626] CPU: 0 PID: 7550 Comm: syz-executor556 Not tainted 5.0.0-rc4+ #58 [ 43.647894] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.657220] Call Trace: [ 43.659785] dump_stack+0x172/0x1f0 [ 43.663389] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 43.668723] __lock_acquire+0x2f00/0x4700 [ 43.672847] ? mark_held_locks+0x100/0x100 [ 43.677066] ? mark_held_locks+0x100/0x100 [ 43.681287] ? __lock_is_held+0xb6/0x140 [ 43.685325] lock_acquire+0x16f/0x3f0 [ 43.689102] ? __do_page_fault+0x9c2/0xd60 [ 43.693312] down_read+0x3b/0x90 [ 43.696652] ? __do_page_fault+0x9c2/0xd60 [ 43.700950] __do_page_fault+0x9c2/0xd60 [ 43.704986] do_page_fault+0x71/0x581 [ 43.708772] page_fault+0x1e/0x30 [ 43.712204] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 43.717974] 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 [ 43.736989] RSP: 0018:ffff8880889e79b8 EFLAGS: 00010293 [ 43.742339] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020ef3c3f [ 43.749583] RDX: 0000000000000000 RSI: ffffffff8328b1e7 RDI: 0000000000000007 [ 43.756834] RBP: ffff8880889e7a58 R08: ffff8880977ba640 R09: fffff940004161ff [ 43.764083] R10: fffff940004161fe R11: ffffea00020b0ff7 R12: 0000000000001000 [ 43.771332] R13: 0000000000001000 R14: 0000000000000000 R15: ffff8880889e7a30 [ 43.778596] ? iov_iter_fault_in_readable+0x367/0x450 [ 43.783781] ? iov_iter_fault_in_readable+0x367/0x450 [ 43.788956] ? copy_page_from_iter+0x750/0x750 [ 43.793525] generic_perform_write+0x195/0x530 [ 43.798091] ? page_endio+0x780/0x780 [ 43.801872] ? current_time+0x140/0x140 [ 43.805826] ? lock_acquire+0x16f/0x3f0 [ 43.809777] __generic_file_write_iter+0x25e/0x630 [ 43.814693] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 43.819689] generic_file_write_iter+0x360/0x610 [ 43.824421] ? __generic_file_write_iter+0x630/0x630 [ 43.829503] ? __fget+0x340/0x540 [ 43.832939] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 43.838450] ? iov_iter_init+0xea/0x220 [ 43.842405] __vfs_write+0x613/0x8e0 [ 43.846098] ? kernel_read+0x120/0x120 [ 43.849965] ? rcu_read_lock_sched_held+0x110/0x130 [ 43.854954] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 43.859684] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 43.865197] ? __sb_start_write+0x1ac/0x360 [ 43.869494] vfs_write+0x20c/0x580 [ 43.873021] ksys_write+0xea/0x1f0 [ 43.876535] ? __ia32_sys_read+0xb0/0xb0 [ 43.880576] ? do_syscall_64+0x26/0x610 [ 43.884536] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.889966] ? do_syscall_64+0x26/0x610 [ 43.893927] __x64_sys_write+0x73/0xb0 [ 43.897786] do_syscall_64+0x103/0x610 [ 43.901647] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.906827] RIP: 0033:0x445799 [ 43.910005] Code: e8 6c b6 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 12 fc ff c3 66 2e 0f 1f 84 00 00 00 00 [ 43.928893] RSP: 002b:00007f75842b4da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 43.936571] RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000445799 [ 43.943817] RDX: 00000000fffffe43 RSI: 0000000020000c40 RDI: 0000000000000004 [ 43.951065] RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000 [ 43.958306] R10: 0000000000000000 R11: 00000000000