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-386-2,10.128.0.62' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 42.104219] [ 42.104538] ====================================================== [ 42.105399] WARNING: possible circular locking dependency detected [ 42.106227] 4.14.0+ #87 Not tainted [ 42.106708] ------------------------------------------------------ [ 42.107534] syzkaller324458/3050 is trying to acquire lock: [ 42.108284] (&bdev->bd_mutex){+.+.}, at: [] blkdev_reread_part+0x1e/0x40 [ 42.109400] [ 42.109400] but task is already holding lock: [ 42.110184] (&lo->lo_ctl_mutex#2){+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 42.111364] [ 42.111364] which lock already depends on the new lock. [ 42.111364] [ 42.112458] [ 42.112458] the existing dependency chain (in reverse order) is: [ 42.113455] [ 42.113455] -> #1 (&lo->lo_ctl_mutex#2){+.+.}: [ 42.114259] lock_acquire+0x1d5/0x580 [ 42.114847] __mutex_lock+0x16f/0x1a80 [ 42.115432] mutex_lock_nested+0x16/0x20 [ 42.116037] lo_release+0x6b/0x180 [ 42.116577] __blkdev_put+0x602/0x7c0 [ 42.117150] blkdev_put+0x85/0x4f0 [ 42.117737] blkdev_close+0x91/0xc0 [ 42.118290] __fput+0x333/0x7f0 [ 42.118835] ____fput+0x15/0x20 [ 42.119432] task_work_run+0x199/0x270 [ 42.120021] exit_to_usermode_loop+0x296/0x310 [ 42.120695] syscall_return_slowpath+0x490/0x550 [ 42.121407] entry_SYSCALL_64_fastpath+0x94/0x96 [ 42.122123] [ 42.122123] -> #0 (&bdev->bd_mutex){+.+.}: [ 42.122881] __lock_acquire+0x33ad/0x4840 [ 42.123498] lock_acquire+0x1d5/0x580 [ 42.124071] __mutex_lock+0x16f/0x1a80 [ 42.124665] mutex_lock_nested+0x16/0x20 [ 42.129211] blkdev_reread_part+0x1e/0x40 [ 42.133846] loop_reread_partitions+0x12f/0x1a0 [ 42.138998] loop_set_status+0x9ba/0xf60 [ 42.143543] loop_set_status_compat+0x92/0xf0 [ 42.148522] lo_compat_ioctl+0x114/0x140 [ 42.153071] compat_blkdev_ioctl+0x3ba/0x1850 [ 42.158051] compat_SyS_ioctl+0x1d7/0x3290 [ 42.162770] do_fast_syscall_32+0x3ee/0xf9d [ 42.167574] entry_SYSENTER_compat+0x51/0x60 [ 42.172470] [ 42.172470] other info that might help us debug this: [ 42.172470] [ 42.180580] Possible unsafe locking scenario: [ 42.180580] [ 42.186599] CPU0 CPU1 [ 42.191233] ---- ---- [ 42.195859] lock(&lo->lo_ctl_mutex#2); [ 42.199885] lock(&bdev->bd_mutex); [ 42.206078] lock(&lo->lo_ctl_mutex#2); [ 42.212619] lock(&bdev->bd_mutex); [ 42.216296] [ 42.216296] *** DEADLOCK *** [ 42.216296] [ 42.222326] 1 lock held by syzkaller324458/3050: [ 42.227041] #0: (&lo->lo_ctl_mutex#2){+.+.}, at: [] lo_compat_ioctl+0x109/0x140 [ 42.236199] [ 42.236199] stack backtrace: [ 42.240659] CPU: 0 PID: 3050 Comm: syzkaller324458 Not tainted 4.14.0+ #87 [ 42.247631] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.256946] Call Trace: [ 42.259503] dump_stack+0x194/0x257 [ 42.263096] ? arch_local_irq_restore+0x53/0x53 [ 42.267729] print_circular_bug+0x42d/0x610 [ 42.272014] ? save_stack_trace+0x1a/0x20 [ 42.276124] check_prev_add+0x8b1/0x1580 [ 42.280147] ? unwind_get_return_address+0x61/0xa0 [ 42.285036] ? copy_trace+0x150/0x150 [ 42.288799] ? check_usage+0xb50/0xb50 [ 42.292651] ? __mmdrop+0x2e0/0x530 [ 42.296245] ? kasan_slab_free+0x71/0xc0 [ 42.300268] ? kmem_cache_free+0x77/0x280 [ 42.304378] ? __mmdrop+0x2e0/0x530 [ 42.307968] ? finish_task_switch+0x459/0x740 [ 42.312427] __lock_acquire+0x33ad/0x4840 [ 42.316543] ? __lock_acquire+0x33ad/0x4840 [ 42.320826] ? do_fast_syscall_32+0x3ee/0xf9d [ 42.325291] ? entry_SYSENTER_compat+0x51/0x60 [ 42.329840] ? debug_check_no_locks_freed+0x3d0/0x3d0 [ 42.334995] ? __lock_acquire+0x6e2/0x4840 [ 42.339194] ? __mmdrop+0x2e0/0x530 [ 42.342785] ? rcu_read_lock_sched_held+0x108/0x120 [ 42.347763] ? kmem_cache_free+0x249/0x280 [ 42.351979] ? print_usage_bug+0x3f0/0x3f0 [ 42.356176] ? check_noncircular+0x20/0x20 [ 42.360375] ? check_noncircular+0x20/0x20 [ 42.364572] ? find_held_lock+0x39/0x1d0 [ 42.368599] ? mark_held_locks+0xb2/0x100 [ 42.372710] lock_acquire+0x1d5/0x580 [ 42.376472] ? blkdev_reread_part+0x1e/0x40 [ 42.380759] ? lock_release+0xd90/0xd90 [ 42.384697] ? trace_event_raw_event_sched_switch+0x8a0/0x8a0 [ 42.390546] ? rcu_note_context_switch+0x710/0x710 [ 42.395441] ? __might_sleep+0x95/0x190 [ 42.399378] ? blkdev_reread_part+0x1e/0x40 [ 42.403662] __mutex_lock+0x16f/0x1a80 [ 42.407512] ? blkdev_reread_part+0x1e/0x40 [ 42.411797] ? print_usage_bug+0x3f0/0x3f0 [ 42.415994] ? blkdev_reread_part+0x1e/0x40 [ 42.420286] ? lock_downgrade+0x990/0x990 [ 42.424403] ? mutex_lock_io_nested+0x1900/0x1900 [ 42.429206] ? check_noncircular+0x20/0x20 [ 42.433438] ? check_noncircular+0x20/0x20 [ 42.437637] ? lock_release+0xd90/0xd90 [ 42.441575] ? mark_held_locks+0xb2/0x100 [ 42.445691] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 42.450758] ? find_held_lock+0x39/0x1d0 [ 42.454782] ? print_usage_bug+0x3f0/0x3f0 [ 42.458986] ? lock_downgrade+0x990/0x990 [ 42.463101] ? __wake_up_common_lock+0x190/0x310 [ 42.467821] ? percpu_ref_switch_to_atomic_rcu+0x5d0/0x5d0 [ 42.473408] ? mark_held_locks+0xb2/0x100 [ 42.477519] ? _raw_spin_unlock_irqrestore+0x31/0xba [ 42.482585] ? trace_hardirqs_on_caller+0x421/0x5c0 [ 42.487563] ? trace_hardirqs_on+0xd/0x10 [ 42.491678] ? __wake_up_common_lock+0x1c2/0x310 [ 42.496399] mutex_lock_nested+0x16/0x20 [ 42.500423] ? mutex_lock_nested+0x16/0x20 [ 42.504621] blkdev_reread_part+0x1e/0x40 [ 42.508732] loop_reread_partitions+0x12f/0x1a0 [ 42.513366] ? __loop_update_dio+0x640/0x640 [ 42.517740] loop_set_status+0x9ba/0xf60 [ 42.521766] loop_set_status_compat+0x92/0xf0 [ 42.526227] ? loop_set_status+0xf60/0xf60 [ 42.530430] ? selinux_file_ioctl+0x444/0x690 [ 42.534899] lo_compat_ioctl+0x114/0x140 [ 42.538927] ? lo_ioctl+0x1b80/0x1b80 [ 42.542693] compat_blkdev_ioctl+0x3ba/0x1850 [ 42.547152] ? bfq_create_group_hierarchy+0x110/0x110 [ 42.552305] ? security_file_ioctl+0x89/0xb0 [ 42.556680] compat_SyS_ioctl+0x1d7/0x3290 [ 42.560881] ? bfq_create_group_hierarchy+0x110/0x110 [ 42.566032] ? do_ioctl+0x60/0x60 [ 42.569451] ? do_fast_syscall_32+0x156/0xf9d [ 42.573917] ? do_ioctl+0x60/0x60 [ 42.577334] do_fast_syscall_32+0x3ee/0xf9d [ 42.581619] ? do_int80_syscall_32+0x9d0/0x9d0 [ 42.586166] ? kasan_check_read+0x11/0x20 [ 42.590277] ? syscall_return_slowpath+0x550/0x550 [ 42.595172] ? SyS_rt_sigaction+0x94/0x1b0 [ 42.599370] ? sysret32_from_system_call+0x5/0x3b [ 42.604193] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 42.609000] entry_SYSENTER_compat+0x51/0x60 [ 42.613369] RIP: 0023:0xf7f3cc79 [ 42.616705] RSP: 002b:00000000ff9d419c EFLAGS: 00000282 ORIG_RAX: 0000000000000036 [ 42.624374] RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000000004c02 [ 42.631608] RDX: 0000000020000000 RSI: 00000000080ef00c RDI: 000000000000003f [ 42.638842] RBP: 000000000000003f R08: 0000000000000000 R09: 0000000000000000 [ 42.646077] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 42.653313] R13: 0000000000000000 R1