INIT: Entering runlevel: 2 [info] Using makefile-style concurrent boot in runlevel 2. [....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added 'ci-upstream-mmots-kasan-gce-4,10.128.15.221' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 29.923330] [ 29.925026] ====================================================== [ 29.931306] WARNING: possible circular locking dependency detected [ 29.937588] 4.13.0-mm1+ #7 Not tainted [ 29.941436] ------------------------------------------------------ [ 29.947714] loop0/2985 is trying to acquire lock: [ 29.952517] (&sb->s_type->i_mutex_key#9){++++}, at: [] generic_file_write_iter+0xdc/0x7a0 [ 29.962459] [ 29.962459] but now in release context of a crosslock acquired at the following: [ 29.971439] ((complete)&ret.event){+.+.}, at: [] submit_bio_wait+0x15e/0x200 [ 29.980245] [ 29.980245] which lock already depends on the new lock. [ 29.980245] [ 29.988522] [ 29.988522] the existing dependency chain (in reverse order) is: [ 29.996109] [ 29.996109] -> #4 ((complete)&ret.event){+.+.}: [ 30.002232] __lock_acquire+0x328f/0x4620 [ 30.006863] lock_acquire+0x1d5/0x580 [ 30.011150] wait_for_completion_io+0xc8/0x770 [ 30.016219] submit_bio_wait+0x15e/0x200 [ 30.020769] blkdev_issue_zeroout+0x13c/0x1d0 [ 30.025750] ext4_init_inode_table+0x4fd/0xdb1 [ 30.030817] ext4_lazyinit_thread+0x81a/0xd40 [ 30.035799] kthread+0x39c/0x470 [ 30.039654] ret_from_fork+0x2a/0x40 [ 30.043850] [ 30.043850] -> #3 (&meta_group_info[i]->alloc_sem){++++}: [ 30.050835] __lock_acquire+0x328f/0x4620 [ 30.055468] lock_acquire+0x1d5/0x580 [ 30.059751] down_read+0x96/0x150 [ 30.063688] __ext4_new_inode+0x26dc/0x4f00 [ 30.068493] ext4_symlink+0x2d9/0xae0 [ 30.072776] vfs_symlink+0x323/0x560 [ 30.076973] SyS_symlink+0x134/0x200 [ 30.081172] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 30.086409] [ 30.086409] -> #2 (jbd2_handle){.+.+}: [ 30.091742] __lock_acquire+0x328f/0x4620 [ 30.096374] lock_acquire+0x1d5/0x580 [ 30.100663] start_this_handle+0x4b8/0x1080 [ 30.105468] jbd2__journal_start+0x389/0x9f0 [ 30.110362] __ext4_journal_start_sb+0x15f/0x550 [ 30.115604] ext4_dirty_inode+0x56/0xa0 [ 30.120065] __mark_inode_dirty+0x912/0x1170 [ 30.124958] generic_update_time+0x1b2/0x270 [ 30.129851] touch_atime+0x26d/0x2f0 [ 30.134048] ext4_file_mmap+0x161/0x1b0 [ 30.138506] mmap_region+0xa99/0x15a0 [ 30.142788] do_mmap+0x6a1/0xd50 [ 30.146638] vm_mmap_pgoff+0x1de/0x280 [ 30.151009] SyS_mmap_pgoff+0x462/0x5f0 [ 30.155468] SyS_mmap+0x16/0x20 [ 30.159235] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 30.164470] [ 30.164470] -> #1 (&mm->mmap_sem){++++}: [ 30.169978] __lock_acquire+0x328f/0x4620 [ 30.174609] lock_acquire+0x1d5/0x580 [ 30.178893] __might_fault+0x13a/0x1d0 [ 30.183267] _copy_to_user+0x2c/0xc0 [ 30.187466] filldir+0x1a7/0x320 [ 30.191318] dcache_readdir+0x12d/0x5e0 [ 30.195774] iterate_dir+0x4b2/0x5d0 [ 30.199980] SyS_getdents+0x225/0x450 [ 30.204267] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 30.209502] [ 30.209502] -> #0 (&sb->s_type->i_mutex_key#9){++++}: [ 30.216139] down_write+0x87/0x120 [ 30.220165] generic_file_write_iter+0xdc/0x7a0 [ 30.225320] do_iter_readv_writev+0x531/0x7f0 [ 30.230297] do_iter_write+0x15a/0x540 [ 30.234667] vfs_iter_write+0x77/0xb0 [ 30.238949] [ 30.238949] other info that might help us debug this: [ 30.238949] [ 30.247052] Chain exists of: [ 30.247052] &sb->s_type->i_mutex_key#9 --> &meta_group_info[i]->alloc_sem --> (complete)&ret.event [ 30.247052] [ 30.260643] Possible unsafe locking scenario by crosslock: [ 30.260643] [ 30.267799] CPU0 CPU1 [ 30.272426] ---- ---- [ 30.277056] lock(&meta_group_info[i]->alloc_sem); [ 30.282034] lock((complete)&ret.event); [ 30.286144] lock(&sb->s_type->i_mutex_key#9); [ 30.293293] unlock((complete)&ret.event); [ 30.300095] [ 30.300095] *** DEADLOCK *** [ 30.300095] [ 30.306116] 1 lock held by loop0/2985: [ 30.309963] #0: (&x->wait#14){..-.}, at: [] complete+0x18/0x80 [ 30.317641] [ 30.317641] stack backtrace: [ 30.322124] CPU: 0 PID: 2985 Comm: loop0 Not tainted 4.13.0-mm1+ #7 [ 30.328581] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.337908] Call Trace: [ 30.340464] dump_stack+0x194/0x257 [ 30.344059] ? arch_local_irq_restore+0x53/0x53 [ 30.348693] print_circular_bug+0x503/0x710 [ 30.352979] ? print_circular_bug_entry+0xb0/0xb0 [ 30.357783] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 30.362947] check_prev_add+0x865/0x1520 [ 30.366972] ? shmem_unused_huge_scan+0x160/0x160 [ 30.371777] ? graph_lock+0x170/0x170 [ 30.375541] ? check_usage+0xb70/0xb70 [ 30.379393] ? memcpy+0x45/0x50 [ 30.382638] ? iov_iter_advance+0x2a1/0x13f0 [ 30.387010] ? hlock_class+0x140/0x140 [ 30.390862] lock_commit_crosslock+0xe73/0x1d10 [ 30.395496] ? lock_commit_crosslock+0xe73/0x1d10 [ 30.400303] ? check_prev_add+0x1520/0x1520 [ 30.404590] ? lock_acquire+0x1d5/0x580 [ 30.408527] ? complete+0x18/0x80 [ 30.411945] ? lock_release+0xd70/0xd70 [ 30.415882] ? find_held_lock+0x39/0x1d0 [ 30.419912] complete+0x24/0x80 [ 30.423159] submit_bio_wait_endio+0x9c/0xd0 [ 30.427530] ? bio_iov_iter_get_pages+0x4e0/0x4e0 [ 30.432335] bio_endio+0x2f8/0x8d0 [ 30.435840] ? bio_dirty_fn+0x3e0/0x3e0 [ 30.439793] ? rcu_pm_notify+0xc0/0xc0 [ 30.443643] ? bio_advance+0xf8/0x370 [ 30.447411] blk_update_request+0x2a6/0xe20 [ 30.451708] ? blk_account_io_completion+0x410/0x410 [ 30.456779] blk_mq_end_request+0x54/0x120 [ 30.460981] lo_complete_rq+0xbe/0x1f0 [ 30.464834] __blk_mq_complete_request+0x38f/0x6c0 [ 30.469737] blk_mq_complete_request+0x4f/0x60 [ 30.474281] loop_queue_work+0x26b/0x3900 [ 30.478392] ? do_raw_spin_trylock+0x190/0x190 [ 30.482939] ? lo_rw_aio+0x1e70/0x1e70 [ 30.486789] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.491250] ? finish_task_switch+0x1d3/0x740 [ 30.495706] ? finish_task_switch+0x1aa/0x740 [ 30.500167] ? preempt_notifier_dec+0x20/0x20 [ 30.504630] ? check_noncircular+0x20/0x20 [ 30.508827] ? __schedule+0x8f0/0x2070 [ 30.512680] ? do_raw_spin_trylock+0x190/0x190 [ 30.517245] ? lock_release+0xd70/0xd70 [ 30.521186] ? compat_start_thread+0x80/0x80 [ 30.525558] ? find_held_lock+0x39/0x1d0 [ 30.529586] ? finish_task_switch+0x1aa/0x740 [ 30.534048] ? kthread_worker_fn+0x4ad/0x9b0 [ 30.538420] ? do_raw_spin_trylock+0x190/0x190 [ 30.542965] ? check_same_owner+0x320/0x320 [ 30.547255] ? _raw_spin_unlock_irq+0x27/0x70 [ 30.551717] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 30.556699] kthread_worker_fn+0x340/0x9b0 [ 30.560901] ? kthread_flush_work+0x560/0x560 [ 30.565359] ? lock_downgrade+0x990/0x990 [ 30.569470] ? complete+0x18/0x80 [ 30.572886] ? schedule+0x108/0x440