Warning: Permanently added '10.128.0.198' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 33.659946] [ 33.661589] ====================================================== [ 33.667917] WARNING: possible circular locking dependency detected [ 33.674210] 4.14.175-syzkaller #0 Not tainted [ 33.678686] ------------------------------------------------------ [ 33.684975] syz-executor629/6310 is trying to acquire lock: [ 33.690657] (&bdev->bd_mutex){+.+.}, at: [] blkdev_reread_part+0x1b/0x40 [ 33.699128] [ 33.699128] but task is already holding lock: [ 33.705089] (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xa30 [ 33.713143] [ 33.713143] which lock already depends on the new lock. [ 33.713143] [ 33.721431] [ 33.721431] the existing dependency chain (in reverse order) is: [ 33.729023] [ 33.729023] -> #2 (&nbd->config_lock){+.+.}: [ 33.734904] __mutex_lock+0xe8/0x1470 [ 33.739202] nbd_open+0x1bf/0x380 [ 33.743151] __blkdev_get+0x2a6/0x10d0 [ 33.747545] blkdev_get+0x84/0x8a0 [ 33.751580] blkdev_open+0x1cc/0x250 [ 33.755786] do_dentry_open+0x732/0xe90 [ 33.760262] vfs_open+0x105/0x220 [ 33.764217] path_openat+0x8ca/0x3c50 [ 33.768513] do_filp_open+0x18e/0x250 [ 33.772808] do_sys_open+0x29d/0x3f0 [ 33.777019] do_syscall_64+0x1d5/0x640 [ 33.781410] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 33.787092] [ 33.787092] -> #1 (nbd_index_mutex){+.+.}: [ 33.792784] __mutex_lock+0xe8/0x1470 [ 33.797083] nbd_open+0x24/0x380 [ 33.800946] __blkdev_get+0x2a6/0x10d0 [ 33.805325] blkdev_get+0x84/0x8a0 [ 33.809361] blkdev_open+0x1cc/0x250 [ 33.813568] do_dentry_open+0x732/0xe90 [ 33.818035] vfs_open+0x105/0x220 [ 33.822011] path_openat+0x8ca/0x3c50 [ 33.826314] do_filp_open+0x18e/0x250 [ 33.830611] do_sys_open+0x29d/0x3f0 [ 33.834820] do_syscall_64+0x1d5/0x640 [ 33.839201] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 33.844881] [ 33.844881] -> #0 (&bdev->bd_mutex){+.+.}: [ 33.850590] lock_acquire+0x170/0x3f0 [ 33.854893] __mutex_lock+0xe8/0x1470 [ 33.859188] blkdev_reread_part+0x1b/0x40 [ 33.863831] nbd_ioctl+0x79d/0xa30 [ 33.867879] blkdev_ioctl+0x91d/0x17d0 [ 33.872272] block_ioctl+0xd9/0x120 [ 33.876391] do_vfs_ioctl+0x75a/0xfe0 [ 33.880686] SyS_ioctl+0x7f/0xb0 [ 33.884547] do_syscall_64+0x1d5/0x640 [ 33.888941] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 33.894630] [ 33.894630] other info that might help us debug this: [ 33.894630] [ 33.902798] Chain exists of: [ 33.902798] &bdev->bd_mutex --> nbd_index_mutex --> &nbd->config_lock [ 33.902798] [ 33.913878] Possible unsafe locking scenario: [ 33.913878] [ 33.919955] CPU0 CPU1 [ 33.924635] ---- ---- [ 33.929275] lock(&nbd->config_lock); [ 33.933140] lock(nbd_index_mutex); [ 33.939348] lock(&nbd->config_lock); [ 33.945729] lock(&bdev->bd_mutex); [ 33.949424] [ 33.949424] *** DEADLOCK *** [ 33.949424] [ 33.955460] 1 lock held by syz-executor629/6310: [ 33.960186] #0: (&nbd->config_lock){+.+.}, at: [] nbd_ioctl+0x11f/0xa30 [ 33.968660] [ 33.968660] stack backtrace: [ 33.973131] CPU: 0 PID: 6310 Comm: syz-executor629 Not tainted 4.14.175-syzkaller #0 [ 33.981023] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 33.990455] Call Trace: [ 33.993027] dump_stack+0x13e/0x194 [ 33.996642] print_circular_bug.isra.0.cold+0x1c4/0x282 [ 34.002034] __lock_acquire+0x2cb3/0x4620 [ 34.006201] ? trace_hardirqs_on+0x10/0x10 [ 34.010411] ? save_trace+0x290/0x290 [ 34.014203] lock_acquire+0x170/0x3f0 [ 34.017981] ? blkdev_reread_part+0x1b/0x40 [ 34.022280] ? blkdev_reread_part+0x1b/0x40 [ 34.026580] __mutex_lock+0xe8/0x1470 [ 34.030356] ? blkdev_reread_part+0x1b/0x40 [ 34.034654] ? blkdev_reread_part+0x1b/0x40 [ 34.038966] ? save_trace+0x290/0x290 [ 34.042753] ? mutex_trylock+0x1a0/0x1a0 [ 34.046821] ? find_held_lock+0x2d/0x110 [ 34.050858] ? nbd_ioctl+0x782/0xa30 [ 34.054544] ? lock_downgrade+0x6e0/0x6e0 [ 34.058665] ? blkdev_reread_part+0x1b/0x40 [ 34.062957] blkdev_reread_part+0x1b/0x40 [ 34.067079] nbd_ioctl+0x79d/0xa30 [ 34.070595] ? save_stack+0x32/0xa0 [ 34.074194] ? kasan_slab_free+0x75/0xc0 [ 34.078240] ? kmem_cache_free+0x7c/0x2b0 [ 34.082444] ? putname+0xcd/0x110 [ 34.085872] ? nbd_add_socket+0x5c0/0x5c0 [ 34.089994] ? find_held_lock+0x2d/0x110 [ 34.094032] ? debug_check_no_obj_freed+0x28e/0x6e4 [ 34.099024] ? nbd_add_socket+0x5c0/0x5c0 [ 34.103145] blkdev_ioctl+0x91d/0x17d0 [ 34.107006] ? blkpg_ioctl+0x8e0/0x8e0 [ 34.110884] block_ioctl+0xd9/0x120 [ 34.114482] ? blkdev_fallocate+0x3a0/0x3a0 [ 34.118779] do_vfs_ioctl+0x75a/0xfe0 [ 34.122560] ? selinux_file_mprotect+0x5c0/0x5c0 [ 34.127292] ? ioctl_preallocate+0x1a0/0x1a0 [ 34.131682] ? rcu_read_lock_sched_held+0x10a/0x130 [ 34.136681] ? kmem_cache_free+0x23a/0x2b0 [ 34.140910] ? putname+0xcd/0x110 [ 34.144339] ? security_file_ioctl+0x76/0xb0 [ 34.148739] ? security_file_ioctl+0x83/0xb0 [ 34.153127] SyS_ioctl+0x7f/0xb0 [ 34.156541] ? do_vfs_ioctl+0xfe0/0xfe0 [ 34.160499] do_syscall_64+0x1d5/0x640 [ 34.164363] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 34.169532] RIP: 0033:0x443df9 [ 34.172697] RSP: 002b:00007ffd1497bc58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 34.180429] RAX: ffffffffffffffda RBX: 00000000004002e0 RCX: 0000000000443df9 [ 34.187675] RDX: 0000000000000000 RSI: 000000000000ab04 RDI: 0000000000000003 [ 34.194922] RBP: 00000000006ce018 R08: 0000000000000000 R09: 00000000004002e0 [ 34.202176] R10: 000000000000000f R11: 0000000000000246 R12: 0000000000401b00 [ 34.209422] R13: 0000000000401b