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-kasan-gce-2,10.128.0.15' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 41.823898] [ 41.824296] ====================================================== [ 41.825125] WARNING: possible circular locking dependency detected [ 41.825966] 4.13.0+ #86 Not tainted [ 41.826449] ------------------------------------------------------ [ 41.827277] loop0/2988 is trying to acquire lock: [ 41.827932] (&sb->s_type->i_mutex_key#9){++++}, at: [] generic_file_write_iter+0xdc/0x7a0 [ 41.829245] [ 41.829245] but now in release context of a crosslock acquired at the following: [ 41.830418] ((complete)&ret.event){+.+.}, at: [] submit_bio_wait+0x15e/0x200 [ 41.831594] [ 41.831594] which lock already depends on the new lock. [ 41.831594] [ 41.832690] [ 41.832690] the existing dependency chain (in reverse order) is: [ 41.833736] [ 41.833736] -> #4 ((complete)&ret.event){+.+.}: [ 41.834587] __lock_acquire+0x328f/0x4620 [ 41.835205] lock_acquire+0x1d5/0x580 [ 41.835797] wait_for_completion_io+0xc8/0x770 [ 41.836490] submit_bio_wait+0x15e/0x200 [ 41.837099] blkdev_issue_zeroout+0x13c/0x1d0 [ 41.837814] ext4_init_inode_table+0x4fd/0xdb1 [ 41.838508] ext4_lazyinit_thread+0x81a/0xd40 [ 41.839171] kthread+0x39c/0x470 [ 41.839693] ret_from_fork+0x2a/0x40 [ 41.840254] [ 41.840254] -> #3 (&meta_group_info[i]->alloc_sem){++++}: [ 41.841180] __lock_acquire+0x328f/0x4620 [ 41.841798] lock_acquire+0x1d5/0x580 [ 41.842371] down_read+0x96/0x150 [ 41.842900] __ext4_new_inode+0x26dc/0x4f00 [ 41.843541] ext4_symlink+0x2d9/0xae0 [ 41.844295] vfs_symlink+0x323/0x560 [ 41.848492] SyS_symlink+0x134/0x200 [ 41.852690] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.857928] [ 41.857928] -> #2 (jbd2_handle){.+.+}: [ 41.863264] __lock_acquire+0x328f/0x4620 [ 41.867897] lock_acquire+0x1d5/0x580 [ 41.872186] start_this_handle+0x4b8/0x1080 [ 41.876991] jbd2__journal_start+0x389/0x9f0 [ 41.881887] __ext4_journal_start_sb+0x15f/0x550 [ 41.887127] ext4_dirty_inode+0x56/0xa0 [ 41.891591] __mark_inode_dirty+0x912/0x1170 [ 41.896485] generic_update_time+0x1b2/0x270 [ 41.901377] touch_atime+0x26d/0x2f0 [ 41.905574] ext4_file_mmap+0x161/0x1b0 [ 41.910032] mmap_region+0xa99/0x15a0 [ 41.914323] do_mmap+0x6a1/0xd50 [ 41.918175] vm_mmap_pgoff+0x1de/0x280 [ 41.922546] SyS_mmap_pgoff+0x462/0x5f0 [ 41.927004] SyS_mmap+0x16/0x20 [ 41.930769] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.936035] [ 41.936035] -> #1 (&mm->mmap_sem){++++}: [ 41.941545] __lock_acquire+0x328f/0x4620 [ 41.946177] lock_acquire+0x1d5/0x580 [ 41.950463] __might_fault+0x13a/0x1d0 [ 41.954834] _copy_to_user+0x2c/0xc0 [ 41.959034] filldir+0x1a7/0x320 [ 41.962885] dcache_readdir+0x12d/0x5e0 [ 41.967343] iterate_dir+0x4b2/0x5d0 [ 41.971541] SyS_getdents+0x225/0x450 [ 41.975825] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 41.981064] [ 41.981064] -> #0 (&sb->s_type->i_mutex_key#9){++++}: [ 41.987699] down_write+0x87/0x120 [ 41.991724] generic_file_write_iter+0xdc/0x7a0 [ 41.996878] do_iter_readv_writev+0x531/0x7f0 [ 42.001857] do_iter_write+0x15a/0x540 [ 42.006231] vfs_iter_write+0x77/0xb0 [ 42.010521] [ 42.010521] other info that might help us debug this: [ 42.010521] [ 42.018626] Chain exists of: [ 42.018626] &sb->s_type->i_mutex_key#9 --> &meta_group_info[i]->alloc_sem --> (complete)&ret.event [ 42.018626] [ 42.032209] Possible unsafe locking scenario by crosslock: [ 42.032209] [ 42.039357] CPU0 CPU1 [ 42.043985] ---- ---- [ 42.048613] lock(&meta_group_info[i]->alloc_sem); [ 42.053596] lock((complete)&ret.event); [ 42.057707] lock(&sb->s_type->i_mutex_key#9); [ 42.064866] unlock((complete)&ret.event); [ 42.071668] [ 42.071668] *** DEADLOCK *** [ 42.071668] [ 42.077689] 1 lock held by loop0/2988: [ 42.081538] #0: (&x->wait#14){..-.}, at: [] complete+0x18/0x80 [ 42.089226] [ 42.089226] stack backtrace: [ 42.093688] CPU: 0 PID: 2988 Comm: loop0 Not tainted 4.13.0+ #86 [ 42.099793] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.109112] Call Trace: [ 42.111671] dump_stack+0x194/0x257 [ 42.115263] ? arch_local_irq_restore+0x53/0x53 [ 42.119900] print_circular_bug+0x503/0x710 [ 42.124185] ? print_circular_bug_entry+0xb0/0xb0 [ 42.128993] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 42.134149] check_prev_add+0x865/0x1520 [ 42.138178] ? shmem_unused_huge_scan+0x160/0x160 [ 42.142986] ? graph_lock+0x170/0x170 [ 42.146753] ? check_usage+0xb70/0xb70 [ 42.150608] ? memcpy+0x45/0x50 [ 42.153853] ? iov_iter_advance+0x2a1/0x13f0 [ 42.158239] ? hlock_class+0x140/0x140 [ 42.162097] lock_commit_crosslock+0xe73/0x1d10 [ 42.166730] ? lock_commit_crosslock+0xe73/0x1d10 [ 42.171540] ? check_prev_add+0x1520/0x1520 [ 42.175826] ? lock_acquire+0x1d5/0x580 [ 42.179762] ? complete+0x18/0x80 [ 42.183179] ? lock_release+0xd70/0xd70 [ 42.187118] ? find_held_lock+0x39/0x1d0 [ 42.191144] complete+0x24/0x80 [ 42.194390] submit_bio_wait_endio+0x9c/0xd0 [ 42.198761] ? bio_iov_iter_get_pages+0x4e0/0x4e0 [ 42.203567] bio_endio+0x2f8/0x8d0 [ 42.207072] ? bio_dirty_fn+0x3e0/0x3e0 [ 42.211014] ? rcu_pm_notify+0xc0/0xc0 [ 42.214863] ? bio_advance+0xf8/0x370 [ 42.218641] blk_update_request+0x2a6/0xe20 [ 42.222927] ? blk_account_io_completion+0x410/0x410 [ 42.227997] blk_mq_end_request+0x54/0x120 [ 42.232200] lo_complete_rq+0xbe/0x1f0 [ 42.236053] __blk_mq_complete_request+0x38f/0x6c0 [ 42.240948] blk_mq_complete_request+0x4f/0x60 [ 42.245495] loop_queue_work+0x26b/0x3900 [ 42.249608] ? do_raw_spin_trylock+0x190/0x190 [ 42.254157] ? lo_rw_aio+0x1e70/0x1e70 [ 42.258007] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.262467] ? finish_task_switch+0x1d3/0x740 [ 42.266925] ? finish_task_switch+0x1aa/0x740 [ 42.271385] ? preempt_notifier_dec+0x20/0x20 [ 42.275845] ? check_noncircular+0x20/0x20 [ 42.280054] ? __schedule+0x8f0/0x2070 [ 42.283910] ? do_raw_spin_trylock+0x190/0x190 [ 42.288456] ? lock_release+0xd70/0xd70 [ 42.292397] ? compat_start_thread+0x80/0x80 [ 42.296768] ? find_held_lock+0x39/0x1d0 [ 42.300795] ? finish_task_switch+0x1aa/0x740 [ 42.305780] ? kthread_worker_fn+0x4ad/0x9b0 [ 42.310159] ? do_raw_spin_trylock+0x190/0x190 [ 42.314705] ? check_same_owner+0x320/0x320 [ 42.318995] ? _raw_spin_unlock_irq+0x27/0x70 [ 42.323467] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.328454] kthread_worker_fn+0x340/0x9b0 [ 42.332654] ? kthread_flush_work+0x560/0x560 [ 42.337115] ? lock_downgrade+0x990/0x990 [ 42.341237] ? default_wake_function+0x30/0x50 [ 42.345782] ? schedule+0x108/0x440 [ 42.349381] ? __schedule+0x2070/0x2070 [ 42.353320] ? do_wait_intr+0x2f0/0x3e0 [ 42.357263] ? __raw_spin_lock_init+0x2d/0x100 [ 42.361811] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 42.366877] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.371856] ? trace_hardirqs_on+0xd/0x10 [ 42