[ 40.090461][ T26] audit: type=1800 audit(1549319910.052:26): pid=7839 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 40.127760][ T26] audit: type=1800 audit(1549319910.052:27): pid=7839 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [ 40.152072][ T26] audit: type=1800 audit(1549319910.062:28): pid=7839 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. [ 40.623485][ T26] audit: type=1800 audit(1549319910.612:29): pid=7839 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 Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.0.23' (ECDSA) to the list of known hosts. executing program executing program syzkaller login: [ 66.872853][ T7995] [ 66.875459][ T7995] ====================================================== [ 66.882453][ T7995] WARNING: possible circular locking dependency detected [ 66.889453][ T7995] 5.0.0-rc4-next-20190201 #25 Not tainted [ 66.895152][ T7995] ------------------------------------------------------ [ 66.902149][ T7995] syz-executor853/7995 is trying to acquire lock: [ 66.908538][ T7995] 00000000a527fa60 (&mm->mmap_sem){++++}, at: __do_page_fault+0x9e9/0xda0 [ 66.917027][ T7995] [ 66.917027][ T7995] but task is already holding lock: [ 66.924379][ T7995] 00000000a8b41fc8 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 66.934697][ T7995] [ 66.934697][ T7995] which lock already depends on the new lock. [ 66.934697][ T7995] [ 66.945098][ T7995] [ 66.945098][ T7995] the existing dependency chain (in reverse order) is: [ 66.954219][ T7995] [ 66.954219][ T7995] -> #2 (&sb->s_type->i_mutex_key#12){+.+.}: [ 66.962363][ T7995] down_write+0x38/0x90 [ 66.967044][ T7995] shmem_fallocate+0x15a/0xc60 [ 66.972332][ T7995] ashmem_shrink_scan+0x1d7/0x4f0 [ 66.977872][ T7995] ashmem_ioctl+0x2f0/0x11a0 [ 66.982972][ T7995] do_vfs_ioctl+0xd6e/0x1390 [ 66.988072][ T7995] ksys_ioctl+0xab/0xd0 [ 66.992756][ T7995] __x64_sys_ioctl+0x73/0xb0 [ 66.997859][ T7995] do_syscall_64+0x103/0x610 [ 67.002963][ T7995] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.009566][ T7995] [ 67.009566][ T7995] -> #1 (ashmem_mutex){+.+.}: [ 67.016417][ T7995] __mutex_lock+0xf7/0x1310 [ 67.021426][ T7995] mutex_lock_nested+0x16/0x20 [ 67.026691][ T7995] ashmem_mmap+0x55/0x520 [ 67.031521][ T7995] mmap_region+0xc3a/0x1770 [ 67.036660][ T7995] do_mmap+0x8e2/0x1080 [ 67.041452][ T7995] vm_mmap_pgoff+0x1c5/0x230 [ 67.046968][ T7995] ksys_mmap_pgoff+0x4aa/0x630 [ 67.053401][ T7995] __x64_sys_mmap+0xe9/0x1b0 [ 67.058505][ T7995] do_syscall_64+0x103/0x610 [ 67.063598][ T7995] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.069984][ T7995] [ 67.069984][ T7995] -> #0 (&mm->mmap_sem){++++}: [ 67.077058][ T7995] lock_acquire+0x16f/0x3f0 [ 67.082071][ T7995] down_read+0x3b/0x90 [ 67.086757][ T7995] __do_page_fault+0x9e9/0xda0 [ 67.092032][ T7995] do_page_fault+0x71/0x581 [ 67.097046][ T7995] page_fault+0x1e/0x30 [ 67.101729][ T7995] iov_iter_fault_in_readable+0x1ba/0x450 [ 67.107999][ T7995] generic_perform_write+0x195/0x530 [ 67.113804][ T7995] __generic_file_write_iter+0x25e/0x630 [ 67.119952][ T7995] generic_file_write_iter+0x360/0x610 [ 67.125913][ T7995] __vfs_write+0x613/0x8e0 [ 67.130832][ T7995] vfs_write+0x20c/0x580 [ 67.135572][ T7995] ksys_write+0xea/0x1f0 [ 67.140314][ T7995] __x64_sys_write+0x73/0xb0 [ 67.145423][ T7995] do_syscall_64+0x103/0x610 [ 67.150538][ T7995] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.156928][ T7995] [ 67.156928][ T7995] other info that might help us debug this: [ 67.156928][ T7995] [ 67.167144][ T7995] Chain exists of: [ 67.167144][ T7995] &mm->mmap_sem --> ashmem_mutex --> &sb->s_type->i_mutex_key#12 [ 67.167144][ T7995] [ 67.180749][ T7995] Possible unsafe locking scenario: [ 67.180749][ T7995] [ 67.188182][ T7995] CPU0 CPU1 [ 67.193549][ T7995] ---- ---- [ 67.199007][ T7995] lock(&sb->s_type->i_mutex_key#12); [ 67.204454][ T7995] lock(ashmem_mutex); [ 67.211103][ T7995] lock(&sb->s_type->i_mutex_key#12); [ 67.219057][ T7995] lock(&mm->mmap_sem); [ 67.223466][ T7995] [ 67.223466][ T7995] *** DEADLOCK *** [ 67.223466][ T7995] [ 67.231728][ T7995] 2 locks held by syz-executor853/7995: [ 67.237244][ T7995] #0: 0000000080c423eb (sb_writers#5){.+.+}, at: vfs_write+0x429/0x580 [ 67.245574][ T7995] #1: 00000000a8b41fc8 (&sb->s_type->i_mutex_key#12){+.+.}, at: generic_file_write_iter+0xdf/0x610 [ 67.256335][ T7995] [ 67.256335][ T7995] stack backtrace: [ 67.262231][ T7995] CPU: 0 PID: 7995 Comm: syz-executor853 Not tainted 5.0.0-rc4-next-20190201 #25 [ 67.271420][ T7995] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 67.281713][ T7995] Call Trace: [ 67.285100][ T7995] dump_stack+0x172/0x1f0 [ 67.289416][ T7995] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 67.295470][ T7995] __lock_acquire+0x2e7a/0x4790 [ 67.300305][ T7995] ? mark_held_locks+0xa4/0xf0 [ 67.305164][ T7995] ? free_unref_page_list+0x86f/0xc40 [ 67.310522][ T7995] ? mark_held_locks+0xf0/0xf0 [ 67.315269][ T7995] ? __lock_is_held+0xb6/0x140 [ 67.320016][ T7995] lock_acquire+0x16f/0x3f0 [ 67.324501][ T7995] ? __do_page_fault+0x9e9/0xda0 [ 67.329429][ T7995] down_read+0x3b/0x90 [ 67.333481][ T7995] ? __do_page_fault+0x9e9/0xda0 [ 67.338402][ T7995] __do_page_fault+0x9e9/0xda0 [ 67.343163][ T7995] ? trace_hardirqs_off_caller+0x65/0x220 [ 67.348880][ T7995] do_page_fault+0x71/0x581 [ 67.353370][ T7995] page_fault+0x1e/0x30 [ 67.357625][ T7995] RIP: 0010:iov_iter_fault_in_readable+0x1ba/0x450 [ 67.364113][ T7995] Code: 4c 39 f3 76 17 eb 3b e8 54 16 45 fe 48 81 c3 00 10 00 00 48 39 9d 68 ff ff ff 72 2d e8 3f 16 45 fe 0f 1f 00 0f ae e8 45 31 f6 <8a> 13 0f 1f 00 31 ff 44 89 f6 41 88 57 d0 e8 a3 17 45 fe 45 85 f6 [ 67.383805][ T7995] RSP: 0018:ffff88809bb679b8 EFLAGS: 00010246 [ 67.389856][ T7995] RAX: ffff888086520200 RBX: 0000000020ed3000 RCX: ffffffff832ae526 [ 67.397829][ T7995] RDX: 0000000000000000 RSI: ffffffff832ae551 RDI: 0000000000000005 [ 67.405792][ T7995] RBP: ffff88809bb67a58 R08: ffff888086520200 R09: fffff9400042264f [ 67.413762][ T7995] R10: fffff9400042264e R11: ffffea0002113277 R12: 0000000000001000 [ 67.422001][ T7995] R13: 0000000000001000 R14: 0000000000000000 R15: ffff88809bb67a30 [ 67.430066][ T7995] ? iov_iter_fault_in_readable+0x186/0x450 [ 67.435958][ T7995] ? iov_iter_fault_in_readable+0x1b1/0x450 [ 67.441859][ T7995] ? iov_iter_fault_in_readable+0x1b1/0x450 [ 67.448856][ T7995] ? csum_and_copy_to_iter+0x15c0/0x15c0 [ 67.454494][ T7995] generic_perform_write+0x195/0x530 [ 67.459782][ T7995] ? page_endio+0x780/0x780 [ 67.464383][ T7995] ? current_time+0x140/0x140 [ 67.469073][ T7995] ? lock_acquire+0x16f/0x3f0 [ 67.473764][ T7995] __generic_file_write_iter+0x25e/0x630 [ 67.479399][ T7995] ? __sanitizer_cov_trace_cmp8+0x18/0x20 [ 67.485107][ T7995] generic_file_write_iter+0x360/0x610 [ 67.490551][ T7995] ? __generic_file_write_iter+0x630/0x630 [ 67.496344][ T7995] ? __fget+0x340/0x540 [ 67.500483][ T7995] ? __sanitizer_cov_trace_const_cmp8+0x18/0x20 [ 67.506841][ T7995] ? iov_iter_init+0xea/0x220 [ 67.511506][ T7995] __vfs_write+0x613/0x8e0 [ 67.515907][ T7995] ? kernel_read+0x120/0x120 [ 67.520479][ T7995] ? rcu_read_lock_sched_held+0x110/0x130 [ 67.526215][ T7995] ? rcu_sync_lockdep_assert+0x73/0xb0 [ 67.531655][ T7995] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 67.537879][ T7995] ? __sb_start_write+0x1ac/0x360 [ 67.542888][ T7995] vfs_write+0x20c/0x580 [ 67.547116][ T7995] ksys_write+0xea/0x1f0 [ 67.551466][ T7995] ? __ia32_sys_read+0xb0/0xb0 [ 67.556324][ T7995] ? do_syscall_64+0x26/0x610 [ 67.561001][ T7995] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.567089][ T7995] ? do_syscall_64+0x26/0x610 [ 67.571789][ T7995] __x64_sys_write+0x73/0xb0 [ 67.576449][ T7995] do_syscall_64+0x103/0x610 [ 67.581031][ T7995] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 67.586904][ T7995] RIP: 0033:0x446479 [ 67.590782][ T7995] 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 [ 67.610365][ T7995] RSP: 002b:00007f93e6544da8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 executing program [ 67.618863][ T7995] RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 0000000000446479 [ 67.626833][ T7995] RDX: 00000000ffffff76 RSI: 0000000020000000 RDI: 0000000000000004 [ 67.634914][ T7995] RBP: 00000000006dbc20 R08: 0000000000000000 R09: 0000000000000000 [ 67.642873][ T7995] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c [ 67.650836][ T7995] 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