[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Update UTMP about System Runlevel Changes. [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.236' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.734533] [ 28.736163] ====================================================== [ 28.742457] WARNING: possible circular locking dependency detected [ 28.748854] 4.14.277-syzkaller #0 Not tainted [ 28.753321] ------------------------------------------------------ [ 28.759614] syz-executor336/7952 is trying to acquire lock: [ 28.765304] (&bdev->bd_mutex){+.+.}, at: [] blkdev_reread_part+0x1b/0x40 [ 28.773780] [ 28.773780] but task is already holding lock: [ 28.779728] (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xa80 [ 28.787768] [ 28.787768] which lock already depends on the new lock. [ 28.787768] [ 28.796061] [ 28.796061] the existing dependency chain (in reverse order) is: [ 28.803666] [ 28.803666] -> #2 (&nbd->config_lock){+.+.}: [ 28.809538] __mutex_lock+0xc4/0x1310 [ 28.813848] nbd_open+0x1b4/0x380 [ 28.817805] __blkdev_get+0x306/0x1090 [ 28.822198] blkdev_get+0x88/0x890 [ 28.826235] blkdev_open+0x1cc/0x250 [ 28.830442] do_dentry_open+0x44b/0xec0 [ 28.834911] vfs_open+0x105/0x220 [ 28.838871] path_openat+0x628/0x2970 [ 28.843169] do_filp_open+0x179/0x3c0 [ 28.847464] do_sys_open+0x296/0x410 [ 28.851676] do_syscall_64+0x1d5/0x640 [ 28.856068] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.861755] [ 28.861755] -> #1 (nbd_index_mutex){+.+.}: [ 28.867710] __mutex_lock+0xc4/0x1310 [ 28.872010] nbd_open+0x22/0x380 [ 28.875873] __blkdev_get+0x306/0x1090 [ 28.880254] blkdev_get+0x88/0x890 [ 28.884290] blkdev_open+0x1cc/0x250 [ 28.888499] do_dentry_open+0x44b/0xec0 [ 28.892969] vfs_open+0x105/0x220 [ 28.896924] path_openat+0x628/0x2970 [ 28.901220] do_filp_open+0x179/0x3c0 [ 28.905515] do_sys_open+0x296/0x410 [ 28.909729] do_syscall_64+0x1d5/0x640 [ 28.914113] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.919798] [ 28.919798] -> #0 (&bdev->bd_mutex){+.+.}: [ 28.925492] lock_acquire+0x170/0x3f0 [ 28.929791] __mutex_lock+0xc4/0x1310 [ 28.938721] blkdev_reread_part+0x1b/0x40 [ 28.943366] nbd_ioctl+0x7cb/0xa80 [ 28.947414] blkdev_ioctl+0x540/0x1830 [ 28.951797] block_ioctl+0xd9/0x120 [ 28.955923] do_vfs_ioctl+0x75a/0xff0 [ 28.960221] SyS_ioctl+0x7f/0xb0 [ 28.964086] do_syscall_64+0x1d5/0x640 [ 28.968474] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.974157] [ 28.974157] other info that might help us debug this: [ 28.974157] [ 28.982273] Chain exists of: [ 28.982273] &bdev->bd_mutex --> nbd_index_mutex --> &nbd->config_lock [ 28.982273] [ 28.993351] Possible unsafe locking scenario: [ 28.993351] [ 28.999382] CPU0 CPU1 [ 29.004023] ---- ---- [ 29.008677] lock(&nbd->config_lock); [ 29.012538] lock(nbd_index_mutex); [ 29.018759] lock(&nbd->config_lock); [ 29.025241] lock(&bdev->bd_mutex); [ 29.028931] [ 29.028931] *** DEADLOCK *** [ 29.028931] [ 29.034969] 1 lock held by syz-executor336/7952: [ 29.039705] #0: (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xa80 [ 29.048175] [ 29.048175] stack backtrace: [ 29.052647] CPU: 0 PID: 7952 Comm: syz-executor336 Not tainted 4.14.277-syzkaller #0 [ 29.060500] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 29.070266] Call Trace: [ 29.072836] dump_stack+0x1b2/0x281 [ 29.076442] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 29.082220] __lock_acquire+0x2e0e/0x3f20 [ 29.086345] ? trace_hardirqs_on+0x10/0x10 [ 29.090556] ? add_lock_to_list.constprop.0+0x17d/0x330 [ 29.095907] ? save_trace+0xd6/0x290 [ 29.099605] lock_acquire+0x170/0x3f0 [ 29.103382] ? blkdev_reread_part+0x1b/0x40 [ 29.107681] ? blkdev_reread_part+0x1b/0x40 [ 29.111979] __mutex_lock+0xc4/0x1310 [ 29.115756] ? blkdev_reread_part+0x1b/0x40 [ 29.120058] ? __mutex_lock+0x360/0x1310 [ 29.124096] ? __get_super.part.0+0xbb/0x390 [ 29.128484] ? blkdev_reread_part+0x1b/0x40 [ 29.132783] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 29.138211] ? lock_downgrade+0x740/0x740 [ 29.142338] ? nbd_ioctl+0x7b0/0xa80 [ 29.146026] ? lock_downgrade+0x740/0x740 [ 29.150151] blkdev_reread_part+0x1b/0x40 [ 29.154276] nbd_ioctl+0x7cb/0xa80 [ 29.157796] ? kasan_slab_free+0xc3/0x1a0 [ 29.161915] ? nbd_disconnect_and_put+0x140/0x140 [ 29.166731] ? do_syscall_64+0x1d5/0x640 [ 29.170766] ? entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.176107] ? path_lookupat+0x780/0x780 [ 29.180147] ? debug_check_no_obj_freed+0x2c0/0x680 [ 29.185142] ? nbd_disconnect_and_put+0x140/0x140 [ 29.189964] blkdev_ioctl+0x540/0x1830 [ 29.193836] ? blkpg_ioctl+0x8d0/0x8d0 [ 29.197700] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 29.202783] ? debug_check_no_obj_freed+0x2c0/0x680 [ 29.207778] block_ioctl+0xd9/0x120 [ 29.211380] ? blkdev_fallocate+0x3a0/0x3a0 [ 29.215682] do_vfs_ioctl+0x75a/0xff0 [ 29.219459] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 29.224889] ? ioctl_preallocate+0x1a0/0x1a0 [ 29.229274] ? kmem_cache_free+0x23a/0x2b0 [ 29.233484] ? putname+0xcd/0x110 [ 29.236919] ? do_sys_open+0x208/0x410 [ 29.240781] ? filp_open+0x60/0x60 [ 29.244300] ? security_file_ioctl+0x83/0xb0 [ 29.248686] SyS_ioctl+0x7f/0xb0 [ 29.252027] ? do_vfs_ioctl+0xff0/0xff0 [ 29.255980] do_syscall_64+0x1d5/0x640 [ 29.259847] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.265014] RIP: 0033:0x7fa82ee395d9 [ 29.268700] RSP: 002b:00007ffd4dd3ea88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 29.276381] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa82ee395d9 [ 29.283628] RDX: 0000000000000000 RSI: