Warning: Permanently added '10.128.0.6' (ECDSA) to the list of known hosts. executing program [ 61.075388][ T8419] [ 61.077725][ T8419] ====================================================== [ 61.084742][ T8419] WARNING: possible circular locking dependency detected [ 61.091731][ T8419] 5.13.0-rc3-syzkaller #0 Not tainted [ 61.097077][ T8419] ------------------------------------------------------ [ 61.104067][ T8419] syz-executor049/8419 is trying to acquire lock: [ 61.110450][ T8419] ffff88814555f3a0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x24b/0xa00 [ 61.119304][ T8419] [ 61.119304][ T8419] but task is already holding lock: [ 61.126640][ T8419] ffffffff8ca6fc08 (nbd_index_mutex){+.+.}-{3:3}, at: refcount_dec_and_mutex_lock+0x50/0x140 [ 61.136800][ T8419] [ 61.136800][ T8419] which lock already depends on the new lock. [ 61.136800][ T8419] [ 61.147208][ T8419] [ 61.147208][ T8419] the existing dependency chain (in reverse order) is: [ 61.156201][ T8419] [ 61.156201][ T8419] -> #1 (nbd_index_mutex){+.+.}-{3:3}: [ 61.163827][ T8419] __mutex_lock+0x139/0x10c0 [ 61.168936][ T8419] nbd_open+0x7d/0x8a0 [ 61.173524][ T8419] __blkdev_get+0x182/0xa30 [ 61.178532][ T8419] blkdev_get_by_dev+0x200/0x660 [ 61.183963][ T8419] blkdev_open+0x154/0x2b0 [ 61.188964][ T8419] do_dentry_open+0x4b9/0x11b0 [ 61.194232][ T8419] path_openat+0x1c0e/0x27e0 [ 61.199328][ T8419] do_filp_open+0x190/0x3d0 [ 61.204329][ T8419] do_sys_openat2+0x16d/0x420 [ 61.209500][ T8419] __x64_sys_open+0x119/0x1c0 [ 61.214673][ T8419] do_syscall_64+0x3a/0xb0 [ 61.219604][ T8419] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 61.225995][ T8419] [ 61.225995][ T8419] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 61.233621][ T8419] __lock_acquire+0x2a17/0x5230 [ 61.238986][ T8419] lock_acquire+0x1ab/0x740 [ 61.244003][ T8419] __mutex_lock+0x139/0x10c0 [ 61.249089][ T8419] del_gendisk+0x24b/0xa00 [ 61.254017][ T8419] nbd_put.part.0+0xae/0x1e0 [ 61.259104][ T8419] nbd_genl_connect+0x1214/0x1650 [ 61.264628][ T8419] genl_family_rcv_msg_doit+0x228/0x320 [ 61.270673][ T8419] genl_rcv_msg+0x328/0x580 [ 61.275674][ T8419] netlink_rcv_skb+0x153/0x420 [ 61.280937][ T8419] genl_rcv+0x24/0x40 [ 61.285417][ T8419] netlink_unicast+0x533/0x7d0 [ 61.290676][ T8419] netlink_sendmsg+0x856/0xd90 [ 61.295942][ T8419] sock_sendmsg+0xcf/0x120 [ 61.300852][ T8419] ____sys_sendmsg+0x6e8/0x810 [ 61.306114][ T8419] ___sys_sendmsg+0xf3/0x170 [ 61.311204][ T8419] __sys_sendmsg+0xe5/0x1b0 [ 61.316203][ T8419] do_syscall_64+0x3a/0xb0 [ 61.321119][ T8419] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 61.327529][ T8419] [ 61.327529][ T8419] other info that might help us debug this: [ 61.327529][ T8419] [ 61.337824][ T8419] Possible unsafe locking scenario: [ 61.337824][ T8419] [ 61.345250][ T8419] CPU0 CPU1 [ 61.350597][ T8419] ---- ---- [ 61.355938][ T8419] lock(nbd_index_mutex); [ 61.360416][ T8419] lock(&bdev->bd_mutex); [ 61.367444][ T8419] lock(nbd_index_mutex); [ 61.374402][ T8419] lock(&bdev->bd_mutex); [ 61.378826][ T8419] [ 61.378826][ T8419] *** DEADLOCK *** [ 61.378826][ T8419] [ 61.386946][ T8419] 3 locks held by syz-executor049/8419: [ 61.392466][ T8419] #0: ffffffff8d736410 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 [ 61.400618][ T8419] #1: ffffffff8d7364c8 (genl_mutex){+.+.}-{3:3}, at: genl_rcv_msg+0x3e0/0x580 [ 61.409549][ T8419] #2: ffffffff8ca6fc08 (nbd_index_mutex){+.+.}-{3:3}, at: refcount_dec_and_mutex_lock+0x50/0x140 [ 61.420145][ T8419] [ 61.420145][ T8419] stack backtrace: [ 61.426008][ T8419] CPU: 0 PID: 8419 Comm: syz-executor049 Not tainted 5.13.0-rc3-syzkaller #0 [ 61.434755][ T8419] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 61.444800][ T8419] Call Trace: [ 61.448055][ T8419] dump_stack+0x141/0x1d7 [ 61.452360][ T8419] check_noncircular+0x25f/0x2e0 [ 61.457275][ T8419] ? netlink_sendmsg+0x856/0xd90 [ 61.462201][ T8419] ? print_circular_bug+0x1e0/0x1e0 [ 61.467390][ T8419] ? __sys_sendmsg+0xe5/0x1b0 [ 61.472049][ T8419] ? entry_SYSCALL_64_after_hwframe+0x44/0xae [ 61.478094][ T8419] ? lockdep_lock+0xc6/0x200 [ 61.482751][ T8419] ? call_rcu_zapped+0xb0/0xb0 [ 61.487494][ T8419] ? mark_held_locks+0x9f/0xe0 [ 61.492254][ T8419] __lock_acquire+0x2a17/0x5230 [ 61.497088][ T8419] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 61.503052][ T8419] lock_acquire+0x1ab/0x740 [ 61.507536][ T8419] ? del_gendisk+0x24b/0xa00 [ 61.512117][ T8419] ? lock_release+0x720/0x720 [ 61.516775][ T8419] ? find_held_lock+0x2d/0x110 [ 61.521540][ T8419] __mutex_lock+0x139/0x10c0 [ 61.526115][ T8419] ? del_gendisk+0x24b/0xa00 [ 61.530787][ T8419] ? mutex_lock_io_nested+0xf20/0xf20 [ 61.536224][ T8419] ? del_gendisk+0x24b/0xa00 [ 61.540791][ T8419] ? __mutex_unlock_slowpath+0xe2/0x610 [ 61.546316][ T8419] ? mutex_lock_io_nested+0xf20/0xf20 [ 61.551669][ T8419] ? wait_for_completion_io+0x270/0x270 [ 61.557191][ T8419] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 61.563429][ T8419] ? kernfs_remove_by_name_ns+0x62/0xb0 [ 61.568958][ T8419] ? sysfs_remove_files+0x87/0xf0 [ 61.573958][ T8419] del_gendisk+0x24b/0xa00 [ 61.578353][ T8419] nbd_put.part.0+0xae/0x1e0 [ 61.582924][ T8419] nbd_genl_connect+0x1214/0x1650 [ 61.587950][ T8419] ? nbd_start_device+0xd50/0xd50 [ 61.592957][ T8419] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 61.599176][ T8419] ? genl_family_rcv_msg_attrs_parse.constprop.0+0x1b7/0x290 [ 61.606542][ T8419] ? genl_family_rcv_msg_attrs_parse.constprop.0+0xaf/0x290 [ 61.613909][ T8419] genl_family_rcv_msg_doit+0x228/0x320 [ 61.619459][ T8419] ? genl_family_rcv_msg_attrs_parse.constprop.0+0x290/0x290 [ 61.626842][ T8419] ? genl_op_from_small+0x23/0x3c0 [ 61.631933][ T8419] ? genl_get_cmd+0x3cf/0x480 [ 61.636590][ T8419] genl_rcv_msg+0x328/0x580 [ 61.641093][ T8419] ? genl_get_cmd+0x480/0x480 [ 61.645747][ T8419] ? nbd_start_device+0xd50/0xd50 [ 61.650851][ T8419] ? lock_release+0x720/0x720 [ 61.655506][ T8419] netlink_rcv_skb+0x153/0x420 [ 61.660247][ T8419] ? genl_get_cmd+0x480/0x480 [ 61.664900][ T8419] ? netlink_ack+0xaa0/0xaa0 [ 61.669479][ T8419] genl_rcv+0x24/0x40 [ 61.673484][ T8419] netlink_unicast+0x533/0x7d0 [ 61.678225][ T8419] ? netlink_attachskb+0x870/0x870 [ 61.683337][ T8419] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 61.689556][ T8419] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 61.695794][ T8419] ? __phys_addr_symbol+0x2c/0x70 [ 61.700797][ T8419] ? __sanitizer_cov_trace_cmp8+0x1d/0x70 [ 61.706580][ T8419] ? __check_object_size+0x171/0x3f0 [ 61.711848][ T8419] netlink_sendmsg+0x856/0xd90 [ 61.716592][ T8419] ? netlink_unicast+0x7d0/0x7d0 [ 61.721511][ T8419] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 61.727735][ T8419] ? netlink_unicast+0x7d0/0x7d0 [ 61.732666][ T8419] sock_sendmsg+0xcf/0x120 [ 61.737068][ T8419] ____sys_sendmsg+0x6e8/0x810 [ 61.741812][ T8419] ? kernel_sendmsg+0x50/0x50 [ 61.746476][ T8419] ? do_recvmmsg+0x6d0/0x6d0 [ 61.751064][ T8419] ? lock_chain_count+0x20/0x20 [ 61.755895][ T8419] ? netlink_recvmsg+0x826/0xee0 [ 61.760837][ T8419] ___sys_sendmsg+0xf3/0x170 [ 61.765406][ T8419] ? sendmsg_copy_msghdr+0x160/0x160 [ 61.770681][ T8419] ? __lock_acquire+0x16a7/0x5230 [ 61.775773][ T8419] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 61.781754][ T8419] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 61.787737][ T8419] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 61.793962][ T8419] ? __fget_light+0x215/0x280 [ 61.798620][ T8419] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 61.804843][ T8419] __sys_sendmsg+0xe5/0x1b0 [ 61.809332][ T8419] ? __sys_sendmsg_sock+0x30/0x30 [ 61.814345][ T8419] ? syscall_enter_from_user_mode+0x27/0x70 [ 61.820236][ T8419] do_syscall_64+0x3a/0xb0 [ 61.824652][ T8419] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 61.830537][ T8419] RIP: 0033:0x43fa59 [ 61.834406][ T8419] Code: 28 c3 e8 5a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48 [ 61.854180][ T8419] RSP: 002b:00007ffce87347a8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 61.862582][ T8419] RAX: ffffffffffffffda RBX: 00000000004004a0 RCX: 000000000043fa59 [ 61.870547][ T8419] RDX: 0000000000000000 RSI: 0000000020000d00 RDI: 0000000000000003 [ 61.878498][ T8419] RBP: 00000000004034c0 R08: 0000000000000002 R09: 00000000004004a0 [ 61.886446][ T8419] R10: 000000000000000c R11: 0000000000000246 R12: 0000000000403550 [ 61.894397][ T8419] R13: 0000000000000000 R14: 00000000004ad018 R15: 00000000004004a0