Warning: Permanently added '10.128.0.150' (ECDSA) to the list of known hosts. syzkaller login: [ 70.047920][ T8433] [ 70.050446][ T8433] ====================================================== [ 70.057456][ T8433] WARNING: possible circular locking dependency detected [ 70.064465][ T8433] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 70.071122][ T8433] ------------------------------------------------------ [ 70.078130][ T8433] syz-executor683/8433 is trying to acquire lock: [ 70.084529][ T8433] ffff88801abedca0 (&bdev->bd_mutex){+.+.}-{3:3}, at: del_gendisk+0x250/0x9e0 [ 70.093410][ T8433] [ 70.093410][ T8433] but task is already holding lock: [ 70.100759][ T8433] ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 70.109607][ T8433] [ 70.109607][ T8433] which lock already depends on the new lock. [ 70.109607][ T8433] [ 70.119982][ T8433] [ 70.119982][ T8433] the existing dependency chain (in reverse order) is: [ 70.129665][ T8433] [ 70.129665][ T8433] -> #2 (bdev_lookup_sem){++++}-{3:3}: [ 70.137294][ T8433] down_write+0x92/0x150 [ 70.142148][ T8433] del_gendisk+0x222/0x9e0 [ 70.147096][ T8433] loop_control_ioctl+0x40d/0x4f0 [ 70.152636][ T8433] __x64_sys_ioctl+0x193/0x200 [ 70.157908][ T8433] do_syscall_64+0x31/0xb0 [ 70.163042][ T8433] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 70.169570][ T8433] [ 70.169570][ T8433] -> #1 (loop_ctl_mutex){+.+.}-{3:3}: [ 70.177196][ T8433] __mutex_lock+0x139/0x1120 [ 70.182388][ T8433] lo_open+0x1a/0x130 [ 70.186946][ T8433] __blkdev_get+0x135/0xa30 [ 70.191961][ T8433] blkdev_get_by_dev+0x200/0x660 executing program [ 70.197448][ T8433] blkdev_open+0x154/0x2b0 [ 70.202394][ T8433] do_dentry_open+0x4b9/0x11c0 [ 70.207682][ T8433] path_openat+0x1c09/0x27d0 [ 70.212811][ T8433] do_filp_open+0x190/0x3d0 [ 70.217822][ T8433] do_sys_openat2+0x16d/0x420 [ 70.223172][ T8433] __x64_sys_open+0x119/0x1c0 [ 70.228366][ T8433] do_syscall_64+0x31/0xb0 [ 70.233293][ T8433] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 70.239697][ T8433] [ 70.239697][ T8433] -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: [ 70.247321][ T8433] __lock_acquire+0x2a17/0x5230 [ 70.252680][ T8433] lock_acquire+0x1ab/0x740 [ 70.257709][ T8433] __mutex_lock+0x139/0x1120 [ 70.262803][ T8433] del_gendisk+0x250/0x9e0 [ 70.267725][ T8433] loop_control_ioctl+0x40d/0x4f0 [ 70.273256][ T8433] __x64_sys_ioctl+0x193/0x200 [ 70.278537][ T8433] do_syscall_64+0x31/0xb0 [ 70.283454][ T8433] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 70.289874][ T8433] [ 70.289874][ T8433] other info that might help us debug this: [ 70.289874][ T8433] [ 70.300085][ T8433] Chain exists of: [ 70.300085][ T8433] &bdev->bd_mutex --> loop_ctl_mutex --> bdev_lookup_sem [ 70.300085][ T8433] [ 70.313004][ T8433] Possible unsafe locking scenario: [ 70.313004][ T8433] [ 70.320766][ T8433] CPU0 CPU1 [ 70.326161][ T8433] ---- ---- [ 70.331508][ T8433] lock(bdev_lookup_sem); [ 70.335911][ T8433] lock(loop_ctl_mutex); [ 70.342739][ T8433] lock(bdev_lookup_sem); [ 70.349652][ T8433] lock(&bdev->bd_mutex); [ 70.354048][ T8433] [ 70.354048][ T8433] *** DEADLOCK *** [ 70.354048][ T8433] [ 70.362168][ T8433] 2 locks held by syz-executor683/8433: [ 70.367690][ T8433] #0: ffffffff8cc73448 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_control_ioctl+0x7b/0x4f0 [ 70.377419][ T8433] #1: ffffffff8c9e4c70 (bdev_lookup_sem){++++}-{3:3}, at: del_gendisk+0x222/0x9e0 [ 70.386722][ T8433] [ 70.386722][ T8433] stack backtrace: [ 70.392587][ T8433] CPU: 0 PID: 8433 Comm: syz-executor683 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 70.404119][ T8433] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 70.414218][ T8433] Call Trace: [ 70.417484][ T8433] dump_stack_lvl+0x13e/0x1d6 [ 70.422158][ T8433] check_noncircular+0x25f/0x2e0 [ 70.427108][ T8433] ? kernel_text_address+0xbd/0xf0 [ 70.432222][ T8433] ? print_circular_bug+0x1e0/0x1e0 [ 70.437520][ T8433] ? create_prof_cpu_mask+0x20/0x20 [ 70.442858][ T8433] ? arch_stack_walk+0x93/0xe0 [ 70.447742][ T8433] ? lockdep_lock+0xc6/0x200 [ 70.452354][ T8433] ? call_rcu_zapped+0xb0/0xb0 [ 70.457209][ T8433] __lock_acquire+0x2a17/0x5230 [ 70.462865][ T8433] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 70.468857][ T8433] lock_acquire+0x1ab/0x740 [ 70.473527][ T8433] ? del_gendisk+0x250/0x9e0 [ 70.478127][ T8433] ? lock_release+0x720/0x720 [ 70.482793][ T8433] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 70.488761][ T8433] __mutex_lock+0x139/0x1120 [ 70.493337][ T8433] ? del_gendisk+0x250/0x9e0 [ 70.497913][ T8433] ? del_gendisk+0x250/0x9e0 [ 70.502490][ T8433] ? mutex_lock_io_nested+0xf70/0xf70 [ 70.507863][ T8433] ? down_write+0xe0/0x150 [ 70.512276][ T8433] ? down_write_killable+0x170/0x170 [ 70.517679][ T8433] ? sysfs_remove_files+0x87/0xf0 [ 70.522710][ T8433] del_gendisk+0x250/0x9e0 [ 70.527126][ T8433] loop_control_ioctl+0x40d/0x4f0 [ 70.532145][ T8433] ? loop_lookup+0x1d0/0x1d0 [ 70.536728][ T8433] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70 [ 70.543065][ T8433] ? loop_lookup+0x1d0/0x1d0 [ 70.547724][ T8433] __x64_sys_ioctl+0x193/0x200 [ 70.552628][ T8433] do_syscall_64+0x31/0xb0 [ 70.557160][ T8433] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 70.563050][ T8433] RIP: 0033:0x43ee49 [ 70.566933][ T8433] 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 [ 70.586564][ T8433] RSP: 002b:00007ffee9ae9ba8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 70.595137][ T8433] RAX: ffffffffffffffda RBX: 0000000000400488 RCX: 000000000043ee49 [ 70.603108][ T8433] RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003 [ 70.611088][ T8433] RBP: 0000000000402e30 R08: 0000000000000000 R09: 0000000000400488 [ 70.619066][ T8433] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402ec0 [ 70.627129][ T8433] R13: 0000000000000000 R14: 00000000004ac018 R15: 0000000000400488