[ 34.920552] audit: type=1800 audit(1549173511.028:27): pid=7450 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 34.920572] audit: type=1800 audit(1549173511.028:28): pid=7450 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.987048] audit: type=1800 audit(1549173512.118:29): pid=7450 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="rc.local" dev="sda1" ino=2432 res=0 [ 36.005742] audit: type=1800 audit(1549173512.118:30): pid=7450 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.173' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 48.214819] [ 48.216487] ====================================================== [ 48.222785] WARNING: possible circular locking dependency detected [ 48.229083] 5.0.0-rc4+ #58 Not tainted [ 48.232954] ------------------------------------------------------ [ 48.239252] syz-executor778/7604 is trying to acquire lock: [ 48.245025] 000000003159e26f (&mm->mmap_sem){++++}, at: __do_page_fault+0x9c2/0xd60 [ 48.252811] [ 48.252811] but task is already holding lock: [ 48.258867] 0000000030cdf7e0 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 48.268506] [ 48.268506] which lock already depends on the new lock. [ 48.268506] [ 48.276804] [ 48.276804] the existing dependency chain (in reverse order) is: [ 48.284458] [ 48.284458] -> #2 (&sb->s_type->i_mutex_key#11){+.+.}: [ 48.291221] down_write+0x38/0x90 [ 48.295185] shmem_fallocate+0x15a/0xc60 [ 48.299942] ashmem_shrink_scan+0x1d7/0x4f0 [ 48.305920] ashmem_ioctl+0x2f0/0x11a0 [ 48.310313] do_vfs_ioctl+0xd6e/0x1390 [ 48.315389] ksys_ioctl+0xab/0xd0 [ 48.319465] __x64_sys_ioctl+0x73/0xb0 [ 48.323856] do_syscall_64+0x103/0x610 [ 48.328245] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.333929] [ 48.333929] -> #1 (ashmem_mutex){+.+.}: [ 48.339366] __mutex_lock+0xf7/0x1310 [ 48.343751] mutex_lock_nested+0x16/0x20 [ 48.348388] ashmem_mmap+0x55/0x520 [ 48.352536] mmap_region+0xc37/0x1760 [ 48.356836] do_mmap+0x8e2/0x1080 [ 48.360793] vm_mmap_pgoff+0x1c5/0x230 [ 48.365188] ksys_mmap_pgoff+0x4aa/0x630 [ 48.369751] __x64_sys_mmap+0xe9/0x1b0 [ 48.374142] do_syscall_64+0x103/0x610 [ 48.378530] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.384213] [ 48.384213] -> #0 (&mm->mmap_sem){++++}: [ 48.389740] lock_acquire+0x16f/0x3f0 [ 48.394044] down_read+0x3b/0x90 [ 48.397915] __do_page_fault+0x9c2/0xd60 [ 48.402476] do_page_fault+0x71/0x581 [ 48.406776] page_fault+0x1e/0x30 [ 48.410733] iov_iter_fault_in_readable+0x377/0x450 [ 48.416249] generic_perform_write+0x195/0x530 [ 48.421554] __generic_file_write_iter+0x25e/0x630 [ 48.426995] generic_file_write_iter+0x360/0x610 [ 48.432255] __vfs_write+0x613/0x8e0 [ 48.436470] vfs_write+0x20c/0x580 [ 48.440520] ksys_write+0xea/0x1f0 [ 48.444575] __x64_sys_write+0x73/0xb0 [ 48.448968] do_syscall_64+0x103/0x610 [ 48.453364] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.459053] [ 48.459053] other info that might help us debug this: [ 48.459053] [ 48.467167] Chain exists of: [ 48.467167] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#11 [ 48.467167] [ 48.478677] Possible unsafe locking scenario: [ 48.478677] [ 48.484711] CPU0 CPU1 [ 48.489352] ---- ---- [ 48.493995] lock(&sb->s_type->i_mutex_key#11); [ 48.498730] lock(ashmem_mutex); [ 48.504764] lock(&sb->s_type->i_mutex_key#11); [ 48.512022] lock(&mm->mmap_sem); [ 48.515750] [ 48.515750] *** DEADLOCK *** [ 48.515750] [ 48.521861] 2 locks held by syz-executor778/7604: [ 48.526685] #0: 00000000a4aa1c47 (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 48.534297] #1: 0000000030cdf7e0 (&sb->s_type->i_mutex_key#11){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 48.544336] [ 48.544336] stack backtrace: [ 48.548818] CPU: 0 PID: 7604 Comm: syz-executor778 Not tainted 5.0.0-rc4+ #58 [ 48.556068] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.565414] Call Trace: [ 48.568037] dump_stack+0x172/0x1f0 [ 48.571657] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 48.577009] __lock_acquire+0x2f00/0x4700 [ 48.581139] ? free_unref_page_list+0x86f/0xc40 [ 48.585798] ? release_pages+0x60d/0x1940 [ 48.589927] ? free_unref_page_list+0x86f/0xc40 [ 48.594585] ? mark_held_locks+0x100/0x100 [ 48.598804] ? mark_held_locks+0x100/0x100 [ 48.603022] ? __lock_is_held+0xb6/0x140 [ 48.607078] lock_acquire+0x16f/0x3f0 [ 48.610865] ? __do_page_fault+0x9c2/0xd60 [ 48.615088] down_read+0x3b/0x90 [ 48.618436] ? __do_page_fault+0x9c2/0xd60 [ 48.622651] __do_page_fault+0x9c2/0xd60 [ 48.626778] do_page_fault+0x71/0x581 [ 48.630572] page_fault+0x1e/0x30 [ 48.634010] RIP: 0010:iov_iter_fault_in_readable+0x377/0x450 [ 48.639788] 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 [ 48.658671] RSP: 0018:ffff888093bc79b8 EFLAGS: 00010293 [ 48.664074] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000020e8953f [ 48.671330] RDX: 0000000000000000 RSI: ffffffff8328b1e7 RDI: 0000000000000007 [ 48.678584] RBP: ffff888093bc7a58 R08: ffff8880973664c0 R09: fffff94000417e9f [ 48.685842] R10: fffff94000417e9e R11: ffffea00020bf4f7 R12: 0000000000001000 [ 48.693106] R13: 0000000000001000 R14: 0000000000000000 R15: ffff888093bc7a30 [ 48.700378] ? iov_iter_fault_in_readable+0x367/0x450 [ 48.705565] ? iov_iter_fault_in_readable+0x367/0x450 [ 48.710737] ? copy_page_from_iter+0x750/0x750 [ 48.715415] generic_perform_write+0x195/0x530 [ 48.719982] ? page_endio+0x780/0x780 [ 48.723770] ? current_time+0x140/0x140 [ 48.727729] ? lock_acquire+0x16f/0x3f0 [ 48.731687] __generic_file_write_iter+0x25e/0x630 [ 48.736601] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 48.741614] generic_file_write_iter+0x360/0x610 [ 48.746359] ? __generic_file_write_iter+0x630/0x630 [ 48.751464] ? __fget+0x340/0x540 [ 48.754905] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 48.760547] ? iov_iter_init+0xea/0x220 [ 48.764515] __vfs_write+0x613/0x8e0 [ 48.768224] ? kernel_read+0x120/0x120 [ 48.772106] ? rcu_read_lock_sched_held+0x110/0x130 [ 48.777118] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 48.781862] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 48.787398] ? __sb_start_write+0x1ac/0x360 [ 48.791705] vfs_write+0x20c/0x580 [ 48.795226] ksys_write+0xea/0x1f0 [ 48.798748] ? __ia32_sys_read+0xb0/0xb0 [ 48.802796] ? do_syscall_64+0x26/0x610 [ 48.806750] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.812091] ? do_syscall_64+0x26/0x610 [ 48.816044] __x64_sys_write+0x73/0xb0 [ 48.819912] do_syscall_64+0x103/0x610 [ 48.823784] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 48.828952] RIP: 0033:0x4463e9 [ 48.832134] 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 [ 48.851019] RSP: 002b:00007ff749ea4da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 48.858715] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 00000000004463e9 executing program [ 48.865973] RDX: 00000000fffffda2 RSI: 0000000020000540 RDI: 0000000000000004 [ 48.873290] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 48.880543] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 48.888317] 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