Warning: Permanently added '10.128.0.25' (ECDSA) to the list of known hosts. syzkaller login: [ 76.120111][ T8438] [ 76.123521][ T8438] ====================================================== [ 76.131444][ T8438] WARNING: possible circular locking dependency detected [ 76.139712][ T8438] 5.13.0-rc5-syzkaller #0 Not tainted [ 76.145702][ T8438] ------------------------------------------------------ [ 76.153287][ T8438] syz-executor787/8438 is trying to acquire lock: [ 76.159900][ T8438] ffff88801aa02320 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x24b/0xa00 [ 76.169113][ T8438] [ 76.169113][ T8438] but task is already holding lock: [ 76.177069][ T8438] ffffffff8ca6dc88 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 76.187287][ T8438] [ 76.187287][ T8438] which lock already depends on the new lock. [ 76.187287][ T8438] [ 76.197962][ T8438] [ 76.197962][ T8438] the existing dependency chain (in reverse order) is: [ 76.207341][ T8438] [ 76.207341][ T8438] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 76.215289][ T8438] __mutex_lock+0x139/0x10c0 [ 76.220428][ T8438] lo_open+0x1a/0x130 [ 76.225487][ T8438] __blkdev_get+0x182/0xa30 [ 76.230891][ T8438] blkdev_get_by_dev+0x200/0x660 [ 76.236724][ T8438] blkdev_open+0x154/0x2b0 [ 76.241792][ T8438] do_dentry_open+0x4b9/0x11b0 [ 76.247077][ T8438] path_openat+0x1c0e/0x27e0 [ 76.253136][ T8438] do_filp_open+0x190/0x3d0 [ 76.258287][ T8438] do_sys_openat2+0x16d/0x420 [ 76.263769][ T8438] __x64_sys_open+0x119/0x1c0 [ 76.269343][ T8438] do_syscall_64+0x3a/0xb0 [ 76.274674][ T8438] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 76.281309][ T8438] [ 76.281309][ T8438] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 76.289231][ T8438] __lock_acquire+0x2a17/0x5230 [ 76.294614][ T8438] lock_acquire+0x1ab/0x740 [ 76.299743][ T8438] __mutex_lock+0x139/0x10c0 [ 76.305062][ T8438] del_gendisk+0x24b/0xa00 [ 76.310089][ T8438] loop_control_ioctl+0x40d/0x4f0 [ 76.316017][ T8438] __x64_sys_ioctl+0x193/0x200 [ 76.321752][ T8438] do_syscall_64+0x3a/0xb0 [ 76.326780][ T8438] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 76.333585][ T8438] [ 76.333585][ T8438] other info that might help us debug this: [ 76.333585][ T8438] [ 76.344980][ T8438] Possible unsafe locking scenario: [ 76.344980][ T8438] [ 76.353034][ T8438] CPU0 CPU1 [ 76.359309][ T8438] ---- ---- [ 76.366007][ T8438] lock(loop_ctl_mutex); [ 76.371152][ T8438] lock(&bdev->bd_mutex); [ 76.379252][ T8438] lock(loop_ctl_mutex); [ 76.386601][ T8438] lock(&bdev->bd_mutex); [ 76.391399][ T8438] [ 76.391399][ T8438] *** DEADLOCK *** [ 76.391399][ T8438] [ 76.401336][ T8438] 1 lock held by syz-executor787/8438: [ 76.408095][ T8438] #0: ffffffff8ca6dc88 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 76.418609][ T8438] [ 76.418609][ T8438] stack backtrace: [ 76.424675][ T8438] CPU: 0 PID: 8438 Comm: syz-executor787 Not tainted 5.13.0-rc5-syzkaller #0 [ 76.434173][ T8438] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 76.445178][ T8438] Call Trace: [ 76.448551][ T8438] dump_stack+0x141/0x1d7 [ 76.453344][ T8438] check_noncircular+0x25f/0x2e0 [ 76.459330][ T8438] ? print_circular_bug+0x1e0/0x1e0 [ 76.465365][ T8438] ? lockdep_lock+0xc6/0x200 [ 76.470463][ T8438] ? call_rcu_zapped+0xb0/0xb0 [ 76.475450][ T8438] ? mark_held_locks+0x9f/0xe0 [ 76.480587][ T8438] __lock_acquire+0x2a17/0x5230 [ 76.485623][ T8438] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 76.491714][ T8438] lock_acquire+0x1ab/0x740 [ 76.496537][ T8438] ? del_gendisk+0x24b/0xa00 [ 76.501298][ T8438] ? lock_release+0x720/0x720 [ 76.506072][ T8438] ? find_held_lock+0x2d/0x110 [ 76.510945][ T8438] __mutex_lock+0x139/0x10c0 [ 76.515957][ T8438] ? del_gendisk+0x24b/0xa00 [ 76.520812][ T8438] ? mutex_lock_io_nested+0xf20/0xf20 [ 76.526952][ T8438] ? del_gendisk+0x24b/0xa00 [ 76.532210][ T8438] ? __mutex_unlock_slowpath+0xe2/0x610 [ 76.538074][ T8438] ? mutex_lock_io_nested+0xf20/0xf20 [ 76.544279][ T8438] ? wait_for_completion_io+0x270/0x270 [ 76.550704][ T8438] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 76.557440][ T8438] ? kernfs_remove_by_name_ns+0x62/0xb0 [ 76.563696][ T8438] ? sysfs_remove_files+0x87/0xf0 [ 76.570068][ T8438] del_gendisk+0x24b/0xa00 [ 76.574594][ T8438] loop_control_ioctl+0x40d/0x4f0 [ 76.579805][ T8438] ? loop_lookup+0x1d0/0x1d0 [ 76.585084][ T8438] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 76.591439][ T8438] ? loop_lookup+0x1d0/0x1d0 [ 76.596504][ T8438] __x64_sys_ioctl+0x193/0x200 [ 76.601389][ T8438] do_syscall_64+0x3a/0xb0 [ 76.605986][ T8438] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 76.612227][ T8438] RIP: 0033:0x43ee49 [ 76.616427][ T8438] Code: 28 c3 e8 2a 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 [ 76.636495][ T8438] RSP: 002b:00007ffde7f51548 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 76.645547][ T8438] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [ 76.653522][ T8438] RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 [ 76.661545][ T8438] RBP: 0000000000402e30 R08: 0000000000000000 R09: 0000000000400488 executing program [ 76.669512][ T8438] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ec0 [ 76.677506][ T8438] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488