Warning: Permanently added '10.128.0.100' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 71.077579][ T8445] [ 71.079955][ T8445] ====================================================== [ 71.086949][ T8445] WARNING: possible circular locking dependency detected [ 71.093946][ T8445] 5.13.0-rc2-next-20210518-syzkaller #0 Not tainted [ 71.100511][ T8445] ------------------------------------------------------ [ 71.107505][ T8445] syz-executor084/8445 is trying to acquire lock: [ 71.113912][ T8445] ffffffff8cc71c28 (brd_devices_mutex){+.+.}-{3:3}, at: brd_probe+0x31/0x250 [ 71.122710][ T8445] [ 71.122710][ T8445] but task is already holding lock: [ 71.130066][ T8445] ffffffff8c9e4b28 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 71.139552][ T8445] [ 71.139552][ T8445] which lock already depends on the new lock. [ 71.139552][ T8445] [ 71.149936][ T8445] [ 71.149936][ T8445] the existing dependency chain (in reverse order) is: [ 71.158926][ T8445] [ 71.158926][ T8445] -> #3 (major_names_lock){+.+.}-{3:3}: [ 71.166669][ T8445] __mutex_lock+0x139/0x1120 [ 71.171796][ T8445] __register_blkdev+0x2b/0x3e0 [ 71.177168][ T8445] register_mtd_blktrans+0x85/0x3c0 [ 71.182879][ T8445] do_one_initcall+0x103/0x650 [ 71.188156][ T8445] kernel_init_freeable+0x643/0x6cc [ 71.193865][ T8445] kernel_init+0xd/0x1c0 [ 71.198617][ T8445] ret_from_fork+0x1f/0x30 [ 71.203541][ T8445] [ 71.203541][ T8445] -> #2 (mtd_table_mutex){+.+.}-{3:3}: [ 71.211193][ T8445] __mutex_lock+0x139/0x1120 [ 71.216291][ T8445] blktrans_open+0x69/0x600 [ 71.221303][ T8445] __blkdev_get+0x135/0xa30 [ 71.226314][ T8445] blkdev_get_by_dev+0x200/0x660 [ 71.231758][ T8445] blkdev_open+0x154/0x2b0 [ 71.236683][ T8445] do_dentry_open+0x4b9/0x11c0 [ 71.241951][ T8445] path_openat+0x1c09/0x27d0 [ 71.247048][ T8445] do_filp_open+0x190/0x3d0 [ 71.252070][ T8445] do_sys_openat2+0x16d/0x420 [ 71.257263][ T8445] __x64_sys_open+0x119/0x1c0 [ 71.262452][ T8445] do_syscall_64+0x31/0xb0 [ 71.267377][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 71.273783][ T8445] [ 71.273783][ T8445] -> #1 (&bdev->bd_mutex){+.+.}-{3:3}: [ 71.281409][ T8445] __mutex_lock+0x139/0x1120 [ 71.286501][ T8445] blkdev_get_by_dev+0x1f6/0x660 [ 71.291947][ T8445] __device_add_disk+0x7f2/0x1230 [ 71.297481][ T8445] brd_init+0x307/0x4cd [ 71.302146][ T8445] do_one_initcall+0x103/0x650 [ 71.307418][ T8445] kernel_init_freeable+0x643/0x6cc [ 71.313120][ T8445] kernel_init+0xd/0x1c0 [ 71.317867][ T8445] ret_from_fork+0x1f/0x30 [ 71.322789][ T8445] [ 71.322789][ T8445] -> #0 (brd_devices_mutex){+.+.}-{3:3}: [ 71.330586][ T8445] __lock_acquire+0x2a17/0x5230 [ 71.335942][ T8445] lock_acquire+0x1ab/0x740 [ 71.340958][ T8445] __mutex_lock+0x139/0x1120 [ 71.346053][ T8445] brd_probe+0x31/0x250 [ 71.350716][ T8445] blk_request_module+0x111/0x1d0 [ 71.356247][ T8445] blkdev_get_no_open+0x225/0x2b0 [ 71.361781][ T8445] blkdev_get_by_dev+0x76/0x660 [ 71.367140][ T8445] blkdev_open+0x154/0x2b0 [ 71.372065][ T8445] do_dentry_open+0x4b9/0x11c0 [ 71.377335][ T8445] path_openat+0x1c09/0x27d0 [ 71.382433][ T8445] do_filp_open+0x190/0x3d0 [ 71.387457][ T8445] do_sys_openat2+0x16d/0x420 [ 71.392638][ T8445] __x64_sys_openat+0x13f/0x1f0 [ 71.397994][ T8445] do_syscall_64+0x31/0xb0 [ 71.402931][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 71.409333][ T8445] [ 71.409333][ T8445] other info that might help us debug this: [ 71.409333][ T8445] [ 71.419539][ T8445] Chain exists of: [ 71.419539][ T8445] brd_devices_mutex --> mtd_table_mutex --> major_names_lock [ 71.419539][ T8445] [ 71.432811][ T8445] Possible unsafe locking scenario: [ 71.432811][ T8445] [ 71.440241][ T8445] CPU0 CPU1 [ 71.445589][ T8445] ---- ---- [ 71.450933][ T8445] lock(major_names_lock); [ 71.455414][ T8445] lock(mtd_table_mutex); [ 71.462329][ T8445] lock(major_names_lock); [ 71.469336][ T8445] lock(brd_devices_mutex); [ 71.473906][ T8445] [ 71.473906][ T8445] *** DEADLOCK *** [ 71.473906][ T8445] [ 71.482035][ T8445] 1 lock held by syz-executor084/8445: [ 71.487473][ T8445] #0: ffffffff8c9e4b28 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 71.497378][ T8445] [ 71.497378][ T8445] stack backtrace: [ 71.503245][ T8445] CPU: 1 PID: 8445 Comm: syz-executor084 Not tainted 5.13.0-rc2-next-20210518-syzkaller #0 [ 71.513206][ T8445] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 71.523242][ T8445] Call Trace: [ 71.526528][ T8445] dump_stack_lvl+0x13e/0x1d6 [ 71.531196][ T8445] check_noncircular+0x25f/0x2e0 [ 71.536132][ T8445] ? print_circular_bug+0x1e0/0x1e0 [ 71.541332][ T8445] ? lock_chain_count+0x20/0x20 [ 71.546176][ T8445] ? slab_free_freelist_hook+0xdf/0x240 [ 71.551731][ T8445] ? kfree+0xeb/0x650 [ 71.555733][ T8445] ? tomoyo_check_open_permission+0x172/0x380 [ 71.561792][ T8445] ? tomoyo_file_open+0xa3/0xd0 [ 71.566631][ T8445] ? security_file_open+0x52/0x4f0 [ 71.571740][ T8445] ? lockdep_lock+0xc6/0x200 [ 71.576319][ T8445] ? call_rcu_zapped+0xb0/0xb0 [ 71.581095][ T8445] __lock_acquire+0x2a17/0x5230 [ 71.585936][ T8445] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 71.591904][ T8445] lock_acquire+0x1ab/0x740 [ 71.596392][ T8445] ? brd_probe+0x31/0x250 [ 71.600713][ T8445] ? lock_release+0x720/0x720 [ 71.605379][ T8445] __mutex_lock+0x139/0x1120 [ 71.609954][ T8445] ? brd_probe+0x31/0x250 [ 71.614271][ T8445] ? brd_probe+0x31/0x250 [ 71.618592][ T8445] ? mutex_lock_io_nested+0xf70/0xf70 [ 71.623949][ T8445] ? mutex_lock_io_nested+0xf70/0xf70 [ 71.629306][ T8445] ? find_held_lock+0x2d/0x110 [ 71.634059][ T8445] ? __up_read+0x1a1/0x7b0 [ 71.638461][ T8445] ? _down_write_nest_lock+0x150/0x150 [ 71.643908][ T8445] ? brd_lookup_page+0x1d0/0x1d0 [ 71.648834][ T8445] brd_probe+0x31/0x250 [ 71.652978][ T8445] ? brd_lookup_page+0x1d0/0x1d0 [ 71.657903][ T8445] blk_request_module+0x111/0x1d0 [ 71.662919][ T8445] blkdev_get_no_open+0x225/0x2b0 [ 71.667934][ T8445] blkdev_get_by_dev+0x76/0x660 [ 71.672777][ T8445] blkdev_open+0x154/0x2b0 [ 71.677618][ T8445] do_dentry_open+0x4b9/0x11c0 [ 71.682367][ T8445] ? blkdev_get_by_dev+0x660/0x660 [ 71.687466][ T8445] ? may_open+0x1f6/0x420 [ 71.691786][ T8445] path_openat+0x1c09/0x27d0 [ 71.696364][ T8445] ? path_lookupat+0x850/0x850 [ 71.701117][ T8445] ? mark_lock+0xef/0x17b0 [ 71.705515][ T8445] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 71.711516][ T8445] do_filp_open+0x190/0x3d0 [ 71.716018][ T8445] ? may_open_dev+0xf0/0xf0 [ 71.720519][ T8445] ? alloc_fd+0x2f0/0x670 [ 71.724834][ T8445] ? rwlock_bug.part.0+0x90/0x90 [ 71.729768][ T8445] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 71.735996][ T8445] ? _find_next_bit+0x1e3/0x260 [ 71.740838][ T8445] ? _raw_spin_unlock+0x24/0x40 [ 71.745676][ T8445] ? alloc_fd+0x2f0/0x670 [ 71.750000][ T8445] do_sys_openat2+0x16d/0x420 [ 71.754663][ T8445] ? build_open_flags+0x6f0/0x6f0 [ 71.759677][ T8445] ? __context_tracking_exit+0xb8/0xe0 [ 71.765126][ T8445] ? lock_downgrade+0x6e0/0x6e0 [ 71.769965][ T8445] __x64_sys_openat+0x13f/0x1f0 [ 71.774800][ T8445] ? __ia32_sys_open+0x1c0/0x1c0 [ 71.779725][ T8445] ? syscall_enter_from_user_mode+0x21/0x70 [ 71.785607][ T8445] do_syscall_64+0x31/0xb0 [ 71.790008][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 71.795890][ T8445] RIP: 0033:0x445359 [ 71.799769][ T8445] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 14 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 [ 71.819361][ T8445] RSP: 002b:00007f039e8ab2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 71.827849][ T8445] RAX: fffffff