Warning: Permanently added '10.128.1.63' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 54.396182][ T8386] [ 54.398517][ T8386] ====================================================== [ 54.405869][ T8386] WARNING: possible circular locking dependency detected [ 54.412860][ T8386] 5.12.0-syzkaller #0 Not tainted [ 54.417853][ T8386] ------------------------------------------------------ [ 54.424837][ T8386] syz-executor981/8386 is trying to acquire lock: [ 54.431218][ T8386] ffffffff8ca55008 (brd_devices_mutex){+.+.}-{3:3}, at: brd_probe+0x31/0x250 [ 54.439990][ T8386] [ 54.439990][ T8386] but task is already holding lock: [ 54.447745][ T8386] ffffffff8c7cf7c8 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 54.457204][ T8386] [ 54.457204][ T8386] which lock already depends on the new lock. [ 54.457204][ T8386] [ 54.467580][ T8386] [ 54.467580][ T8386] the existing dependency chain (in reverse order) is: [ 54.476806][ T8386] [ 54.476806][ T8386] -> #3 (major_names_lock){+.+.}-{3:3}: [ 54.484510][ T8386] __mutex_lock+0x139/0x1120 [ 54.489612][ T8386] __register_blkdev+0x2b/0x3e0 [ 54.494963][ T8386] register_mtd_blktrans+0x85/0x3c0 [ 54.500935][ T8386] do_one_initcall+0x103/0x650 [ 54.506483][ T8386] kernel_init_freeable+0x63e/0x6c2 [ 54.512184][ T8386] kernel_init+0xd/0x1b8 [ 54.516992][ T8386] ret_from_fork+0x1f/0x30 [ 54.521978][ T8386] [ 54.521978][ T8386] -> #2 (mtd_table_mutex){+.+.}-{3:3}: [ 54.529597][ T8386] __mutex_lock+0x139/0x1120 [ 54.534860][ T8386] blktrans_open+0x69/0x600 [ 54.539874][ T8386] __blkdev_get+0x135/0xa30 [ 54.544880][ T8386] blkdev_get_by_dev+0x26c/0x600 [ 54.550320][ T8386] blkdev_open+0x154/0x2b0 [ 54.555237][ T8386] do_dentry_open+0x4b9/0x11b0 [ 54.560502][ T8386] path_openat+0x1c0e/0x27e0 [ 54.565817][ T8386] do_filp_open+0x190/0x3d0 [ 54.570904][ T8386] do_sys_openat2+0x16d/0x420 [ 54.576080][ T8386] __x64_sys_open+0x119/0x1c0 [ 54.581259][ T8386] do_syscall_64+0x3a/0xb0 [ 54.586231][ T8386] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 54.592623][ T8386] [ 54.592623][ T8386] -> #1 (&bdev->bd_mutex){+.+.}-{3:3}: [ 54.600237][ T8386] __mutex_lock+0x139/0x1120 [ 54.605324][ T8386] blkdev_get_by_dev+0x261/0x600 [ 54.610824][ T8386] __device_add_disk+0x809/0x12c0 [ 54.616348][ T8386] brd_init+0x2e6/0x4ac [ 54.620998][ T8386] do_one_initcall+0x103/0x650 [ 54.626258][ T8386] kernel_init_freeable+0x63e/0x6c2 [ 54.631951][ T8386] kernel_init+0xd/0x1b8 [ 54.636689][ T8386] ret_from_fork+0x1f/0x30 [ 54.641666][ T8386] [ 54.641666][ T8386] -> #0 (brd_devices_mutex){+.+.}-{3:3}: [ 54.649451][ T8386] __lock_acquire+0x2a17/0x5230 [ 54.654800][ T8386] lock_acquire+0x1ab/0x740 [ 54.659798][ T8386] __mutex_lock+0x139/0x1120 [ 54.664882][ T8386] brd_probe+0x31/0x250 [ 54.669533][ T8386] blk_request_module+0x111/0x1d0 [ 54.675052][ T8386] blkdev_get_no_open+0x225/0x2b0 [ 54.680573][ T8386] blkdev_get_by_dev+0x1f9/0x600 [ 54.686031][ T8386] blkdev_open+0x154/0x2b0 [ 54.690943][ T8386] do_dentry_open+0x4b9/0x11b0 [ 54.696202][ T8386] path_openat+0x1c0e/0x27e0 [ 54.701283][ T8386] do_filp_open+0x190/0x3d0 [ 54.706280][ T8386] do_sys_openat2+0x16d/0x420 [ 54.711514][ T8386] __x64_sys_openat+0x13f/0x1f0 [ 54.716862][ T8386] do_syscall_64+0x3a/0xb0 [ 54.721775][ T8386] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 54.728166][ T8386] [ 54.728166][ T8386] other info that might help us debug this: [ 54.728166][ T8386] [ 54.738364][ T8386] Chain exists of: [ 54.738364][ T8386] brd_devices_mutex --> mtd_table_mutex --> major_names_lock [ 54.738364][ T8386] [ 54.751623][ T8386] Possible unsafe locking scenario: [ 54.751623][ T8386] [ 54.759044][ T8386] CPU0 CPU1 [ 54.764383][ T8386] ---- ---- [ 54.769721][ T8386] lock(major_names_lock); [ 54.774194][ T8386] lock(mtd_table_mutex); [ 54.781101][ T8386] lock(major_names_lock); [ 54.788117][ T8386] lock(brd_devices_mutex); [ 54.792681][ T8386] [ 54.792681][ T8386] *** DEADLOCK *** [ 54.792681][ T8386] [ 54.800794][ T8386] 1 lock held by syz-executor981/8386: [ 54.806221][ T8386] #0: ffffffff8c7cf7c8 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x25/0x1d0 [ 54.816106][ T8386] [ 54.816106][ T8386] stack backtrace: [ 54.821966][ T8386] CPU: 1 PID: 8386 Comm: syz-executor981 Not tainted 5.12.0-syzkaller #0 [ 54.830351][ T8386] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 54.840393][ T8386] Call Trace: [ 54.843650][ T8386] dump_stack+0x141/0x1d7 [ 54.847973][ T8386] check_noncircular+0x25f/0x2e0 [ 54.852887][ T8386] ? print_circular_bug+0x1e0/0x1e0 [ 54.858059][ T8386] ? lock_chain_count+0x20/0x20 [ 54.862888][ T8386] ? kasan_save_stack+0x32/0x40 [ 54.867715][ T8386] ? kasan_save_stack+0x1b/0x40 [ 54.872540][ T8386] ? kasan_set_track+0x1c/0x30 [ 54.877278][ T8386] ? kasan_set_free_info+0x20/0x30 [ 54.882366][ T8386] ? __kasan_slab_free+0xf5/0x130 [ 54.887367][ T8386] ? lockdep_lock+0xc6/0x200 [ 54.891936][ T8386] ? call_rcu_zapped+0xb0/0xb0 [ 54.896674][ T8386] ? do_syscall_64+0x3a/0xb0 [ 54.901241][ T8386] __lock_acquire+0x2a17/0x5230 [ 54.906069][ T8386] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 54.912026][ T8386] lock_acquire+0x1ab/0x740 [ 54.916507][ T8386] ? brd_probe+0x31/0x250 [ 54.920810][ T8386] ? lock_release+0x720/0x720 [ 54.925463][ T8386] __mutex_lock+0x139/0x1120 [ 54.930030][ T8386] ? brd_probe+0x31/0x250 [ 54.934333][ T8386] ? brd_probe+0x31/0x250 [ 54.938636][ T8386] ? mutex_lock_io_nested+0xf70/0xf70 [ 54.943981][ T8386] ? mutex_lock_io_nested+0xf70/0xf70 [ 54.949326][ T8386] ? find_held_lock+0x2d/0x110 [ 54.954066][ T8386] ? __up_read+0x1a1/0x7b0 [ 54.958472][ T8386] ? _down_write_nest_lock+0x150/0x150 [ 54.963906][ T8386] ? brd_lookup_page+0x1c0/0x1c0 [ 54.968823][ T8386] brd_probe+0x31/0x250 [ 54.972952][ T8386] ? brd_lookup_page+0x1c0/0x1c0 [ 54.977865][ T8386] blk_request_module+0x111/0x1d0 [ 54.982866][ T8386] blkdev_get_no_open+0x225/0x2b0 [ 54.987869][ T8386] blkdev_get_by_dev+0x1f9/0x600 [ 54.992783][ T8386] blkdev_open+0x154/0x2b0 [ 54.997175][ T8386] do_dentry_open+0x4b9/0x11b0 [ 55.001915][ T8386] ? blkdev_get_by_dev+0x600/0x600 [ 55.007008][ T8386] ? may_open+0x1f6/0x420 [ 55.011330][ T8386] path_openat+0x1c0e/0x27e0 [ 55.015894][ T8386] ? path_lookupat+0x850/0x850 [ 55.020634][ T8386] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 55.026591][ T8386] do_filp_open+0x190/0x3d0 [ 55.031067][ T8386] ? may_open_dev+0xf0/0xf0 [ 55.035545][ T8386] ? do_raw_spin_lock+0x120/0x2b0 [ 55.040559][ T8386] ? rwlock_bug.part.0+0x90/0x90 [ 55.045473][ T8386] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70 [ 55.051689][ T8386] ? _raw_spin_unlock+0x24/0x40 [ 55.056512][ T8386] ? alloc_fd+0x2bc/0x640 [ 55.060821][ T8386] do_sys_openat2+0x16d/0x420 [ 55.065474][ T8386] ? build_open_flags+0x6f0/0x6f0 [ 55.070472][ T8386] ? __context_tracking_exit+0xb8/0xe0 [ 55.075905][ T8386] ? lock_downgrade+0x6e0/0x6e0 [ 55.080736][ T8386] __x64_sys_openat+0x13f/0x1f0 [ 55.085568][ T8386] ? __ia32_sys_open+0x1c0/0x1c0 [ 55.090481][ T8386] ? syscall_enter_from_user_mode+0x27/0x70 [ 55.096355][ T8386] do_syscall_64+0x3a/0xb0 [ 55.100751][ T8386] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 55.106621][ T8386] RIP: 0033:0x445359 [ 55.110491][ T8386] 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 [ 55.130076][ T8386] RSP: 002b:00007f11ca5402f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 55.138476][ T8386] RAX: ffffffffffffffda RBX: 00000000004cc4f0 RCX: 0000000000445359 [ 55.146422][ T8386] RDX: 0000000