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-1,10.128.15.212' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 51.217723] [ 51.219388] ====================================================== [ 51.225674] WARNING: possible circular locking dependency detected [ 51.231959] 4.13.0+ #84 Not tainted [ 51.235550] ------------------------------------------------------ [ 51.241840] loop0/2986 is trying to acquire lock: [ 51.246650] (&sb->s_type->i_mutex_key#9){++++}, at: [] generic_file_write_iter+0xdc/0x7a0 [ 51.256604] [ 51.256604] but now in release context of a crosslock acquired at the following: [ 51.265589] ((complete)&ret.event){+.+.}, at: [] submit_bio_wait+0x15e/0x200 [ 51.274412] [ 51.274412] which lock already depends on the new lock. [ 51.274412] [ 51.282699] [ 51.282699] the existing dependency chain (in reverse order) is: [ 51.290294] [ 51.290294] -> #4 ((complete)&ret.event){+.+.}: [ 51.296432] __lock_acquire+0x328f/0x4620 [ 51.301068] lock_acquire+0x1d5/0x580 [ 51.305357] wait_for_completion_io+0xc8/0x770 [ 51.310429] submit_bio_wait+0x15e/0x200 [ 51.314978] blkdev_issue_zeroout+0x13c/0x1d0 [ 51.319962] ext4_init_inode_table+0x4fd/0xdb1 [ 51.325035] ext4_lazyinit_thread+0x81a/0xd40 [ 51.330027] kthread+0x39c/0x470 [ 51.333893] ret_from_fork+0x2a/0x40 [ 51.338094] [ 51.338094] -> #3 (&meta_group_info[i]->alloc_sem){++++}: [ 51.345097] __lock_acquire+0x328f/0x4620 [ 51.349745] lock_acquire+0x1d5/0x580 [ 51.354043] down_read+0x96/0x150 [ 51.358004] __ext4_new_inode+0x26dc/0x4f00 [ 51.362824] ext4_symlink+0x2d9/0xae0 [ 51.367123] vfs_symlink+0x323/0x560 [ 51.371335] SyS_symlink+0x134/0x200 [ 51.375556] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.380807] [ 51.380807] -> #2 (jbd2_handle){.+.+}: [ 51.386165] __lock_acquire+0x328f/0x4620 [ 51.390815] lock_acquire+0x1d5/0x580 [ 51.395137] start_this_handle+0x4b8/0x1080 [ 51.399966] jbd2__journal_start+0x389/0x9f0 [ 51.404887] __ext4_journal_start_sb+0x15f/0x550 [ 51.410142] ext4_dirty_inode+0x56/0xa0 [ 51.414616] __mark_inode_dirty+0x912/0x1170 [ 51.419522] generic_update_time+0x1b2/0x270 [ 51.424433] touch_atime+0x26d/0x2f0 [ 51.428646] ext4_file_mmap+0x161/0x1b0 [ 51.433124] mmap_region+0xa99/0x15a0 [ 51.437433] do_mmap+0x6a1/0xd50 [ 51.441295] vm_mmap_pgoff+0x1de/0x280 [ 51.445676] SyS_mmap_pgoff+0x462/0x5f0 [ 51.450142] SyS_mmap+0x16/0x20 [ 51.453918] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.459162] [ 51.459162] -> #1 (&mm->mmap_sem){++++}: [ 51.464691] __lock_acquire+0x328f/0x4620 [ 51.469339] lock_acquire+0x1d5/0x580 [ 51.473639] __might_fault+0x13a/0x1d0 [ 51.478027] _copy_to_user+0x2c/0xc0 [ 51.482242] filldir+0x1a7/0x320 [ 51.486111] dcache_readdir+0x12d/0x5e0 [ 51.490586] iterate_dir+0x4b2/0x5d0 [ 51.494801] SyS_getdents+0x225/0x450 [ 51.499104] entry_SYSCALL_64_fastpath+0x1f/0xbe [ 51.504351] [ 51.504351] -> #0 (&sb->s_type->i_mutex_key#9){++++}: [ 51.511016] down_write+0x87/0x120 [ 51.515050] generic_file_write_iter+0xdc/0x7a0 [ 51.520213] do_iter_readv_writev+0x531/0x7f0 [ 51.525204] do_iter_write+0x15a/0x540 [ 51.529585] vfs_iter_write+0x77/0xb0 [ 51.533873] [ 51.533873] other info that might help us debug this: [ 51.533873] [ 51.541990] Chain exists of: [ 51.541990] &sb->s_type->i_mutex_key#9 --> &meta_group_info[i]->alloc_sem --> (complete)&ret.event [ 51.541990] [ 51.555596] Possible unsafe locking scenario by crosslock: [ 51.555596] [ 51.562758] CPU0 CPU1 [ 51.567398] ---- ---- [ 51.572036] lock(&meta_group_info[i]->alloc_sem); [ 51.577023] lock((complete)&ret.event); [ 51.581140] lock(&sb->s_type->i_mutex_key#9); [ 51.588299] unlock((complete)&ret.event); [ 51.595115] [ 51.595115] *** DEADLOCK *** [ 51.595115] [ 51.601149] 1 lock held by loop0/2986: [ 51.605007] #0: (&x->wait#14){..-.}, at: [] complete+0x18/0x80 [ 51.612704] [ 51.612704] stack backtrace: [ 51.617177] CPU: 1 PID: 2986 Comm: loop0 Not tainted 4.13.0+ #84 [ 51.623292] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 51.632623] Call Trace: [ 51.635198] dump_stack+0x194/0x257 [ 51.638804] ? arch_local_irq_restore+0x53/0x53 [ 51.643469] print_circular_bug+0x503/0x710 [ 51.647775] ? print_circular_bug_entry+0xb0/0xb0 [ 51.652612] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 51.657797] check_prev_add+0x865/0x1520 [ 51.661843] ? shmem_unused_huge_scan+0x160/0x160 [ 51.666664] ? graph_lock+0x170/0x170 [ 51.670441] ? check_usage+0xb70/0xb70 [ 51.674320] ? memcpy+0x45/0x50 [ 51.677576] ? iov_iter_advance+0x2a1/0x13f0 [ 51.681964] ? hlock_class+0x140/0x140 [ 51.685830] lock_commit_crosslock+0xe73/0x1d10 [ 51.690486] ? lock_commit_crosslock+0xe73/0x1d10 [ 51.695308] ? check_prev_add+0x1520/0x1520 [ 51.699613] ? lock_acquire+0x1d5/0x580 [ 51.703561] ? complete+0x18/0x80 [ 51.707006] ? lock_release+0xd70/0xd70 [ 51.710955] ? find_held_lock+0x39/0x1d0 [ 51.715000] complete+0x24/0x80 [ 51.718253] submit_bio_wait_endio+0x9c/0xd0 [ 51.722635] ? bio_iov_iter_get_pages+0x4e0/0x4e0 [ 51.727450] bio_endio+0x2f8/0x8d0 [ 51.730963] ? bio_dirty_fn+0x3e0/0x3e0 [ 51.734914] ? rcu_pm_notify+0xc0/0xc0 [ 51.738771] ? bio_advance+0xf8/0x370 [ 51.742545] blk_update_request+0x2a6/0xe20 [ 51.746841] ? blk_account_io_completion+0x410/0x410 [ 51.751932] blk_mq_end_request+0x54/0x120 [ 51.756161] lo_complete_rq+0xbe/0x1f0 [ 51.760026] __blk_mq_complete_request+0x38f/0x6c0 [ 51.764937] blk_mq_complete_request+0x4f/0x60 [ 51.769499] loop_queue_work+0x26b/0x3900 [ 51.773623] ? do_raw_spin_trylock+0x190/0x190 [ 51.778181] ? lo_rw_aio+0x1e70/0x1e70 [ 51.782046] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.786510] ? finish_task_switch+0x1d3/0x740 [ 51.790977] ? finish_task_switch+0x1aa/0x740 [ 51.795446] ? preempt_notifier_dec+0x20/0x20 [ 51.799915] ? check_noncircular+0x20/0x20 [ 51.804125] ? __schedule+0x8f0/0x2070 [ 51.807993] ? do_raw_spin_trylock+0x190/0x190 [ 51.812559] ? lock_release+0xd70/0xd70 [ 51.816513] ? compat_start_thread+0x80/0x80 [ 51.820900] ? find_held_lock+0x39/0x1d0 [ 51.824954] ? finish_task_switch+0x1aa/0x740 [ 51.829442] ? kthread_worker_fn+0x4ad/0x9b0 [ 51.833835] ? do_raw_spin_trylock+0x190/0x190 [ 51.838399] ? check_same_owner+0x320/0x320 [ 51.842701] ? _raw_spin_unlock_irq+0x27/0x70 [ 51.847174] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 51.852174] kthread_worker_fn+0x340/0x9b0 [ 51.856408] ? kthread_flush_work+0x560/0x560 [ 51.860887] ? lock_downgrade+0x990/0x990 [ 51.865038] ? default_wake_function+0x30/0x50 [ 51.8696