Warning: Permanently added '10.128.1.75' (ECDSA) to the list of known hosts. executing program [ 62.817880][ T8370] [ 62.821630][ T8370] ====================================================== [ 62.830339][ T8370] WARNING: possible circular locking dependency detected [ 62.838699][ T8370] 5.12.0-syzkaller #0 Not tainted [ 62.843739][ T8370] ------------------------------------------------------ [ 62.852652][ T8370] syz-executor702/8370 is trying to acquire lock: [ 62.861237][ T8370] ffffffff8d465ae8 (brd_devices_mutex){+.+.}-{3:3}, at: brd_probe+0x3a/0x1f0 [ 62.871800][ T8370] [ 62.871800][ T8370] but task is already holding lock: [ 62.880145][ T8370] ffffffff8d2d3f08 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x2f/0x1c0 [ 62.890515][ T8370] [ 62.890515][ T8370] which lock already depends on the new lock. [ 62.890515][ T8370] [ 62.901405][ T8370] [ 62.901405][ T8370] the existing dependency chain (in reverse order) is: [ 62.912856][ T8370] [ 62.912856][ T8370] -> #3 (major_names_lock){+.+.}-{3:3}: [ 62.921261][ T8370] lock_acquire+0x17f/0x720 [ 62.927350][ T8370] __mutex_lock_common+0x1bd/0x2e50 [ 62.933316][ T8370] mutex_lock_nested+0x1a/0x20 [ 62.939260][ T8370] __register_blkdev+0x2c/0x360 [ 62.946026][ T8370] register_mtd_blktrans+0x94/0x3d0 [ 62.952201][ T8370] do_one_initcall+0x1a7/0x400 [ 62.958295][ T8370] do_initcall_level+0x14a/0x1f5 [ 62.964702][ T8370] do_initcalls+0x4b/0x8c [ 62.970869][ T8370] kernel_init_freeable+0x3a3/0x505 [ 62.977499][ T8370] kernel_init+0xd/0x290 [ 62.982441][ T8370] ret_from_fork+0x1f/0x30 [ 62.987688][ T8370] [ 62.987688][ T8370] -> #2 (mtd_table_mutex){+.+.}-{3:3}: [ 62.997005][ T8370] lock_acquire+0x17f/0x720 [ 63.004525][ T8370] __mutex_lock_common+0x1bd/0x2e50 [ 63.011048][ T8370] mutex_lock_nested+0x1a/0x20 [ 63.017455][ T8370] blktrans_open+0x61/0x430 [ 63.023080][ T8370] __blkdev_get+0x251/0xa60 [ 63.029296][ T8370] blkdev_get_by_dev+0xf9/0x640 [ 63.035718][ T8370] blkdev_open+0x132/0x2c0 [ 63.041104][ T8370] do_dentry_open+0x7cb/0x1010 [ 63.047156][ T8370] path_openat+0x28e6/0x39b0 [ 63.052301][ T8370] do_filp_open+0x221/0x460 [ 63.059924][ T8370] do_sys_openat2+0x124/0x460 [ 63.066820][ T8370] __x64_sys_open+0x221/0x270 [ 63.072475][ T8370] do_syscall_64+0x3f/0xb0 [ 63.078648][ T8370] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 63.086778][ T8370] [ 63.086778][ T8370] -> #1 (&bdev->bd_mutex){+.+.}-{3:3}: [ 63.095426][ T8370] lock_acquire+0x17f/0x720 [ 63.101414][ T8370] __mutex_lock_common+0x1bd/0x2e50 [ 63.107593][ T8370] mutex_lock_nested+0x1a/0x20 [ 63.113819][ T8370] blkdev_get_by_dev+0xee/0x640 [ 63.119848][ T8370] __device_add_disk+0xb0b/0x10d0 [ 63.126481][ T8370] brd_init+0x2d8/0x49e [ 63.131145][ T8370] do_one_initcall+0x1a7/0x400 [ 63.136441][ T8370] do_initcall_level+0x14a/0x1f5 [ 63.142163][ T8370] do_initcalls+0x4b/0x8c [ 63.147282][ T8370] kernel_init_freeable+0x3a3/0x505 [ 63.154304][ T8370] kernel_init+0xd/0x290 [ 63.160102][ T8370] ret_from_fork+0x1f/0x30 [ 63.165304][ T8370] [ 63.165304][ T8370] -> #0 (brd_devices_mutex){+.+.}-{3:3}: [ 63.173654][ T8370] check_prevs_add+0x4d6/0x5a90 [ 63.179335][ T8370] __lock_acquire+0x4307/0x6040 [ 63.185780][ T8370] lock_acquire+0x17f/0x720 [ 63.191340][ T8370] __mutex_lock_common+0x1bd/0x2e50 [ 63.197195][ T8370] mutex_lock_nested+0x1a/0x20 [ 63.204144][ T8370] brd_probe+0x3a/0x1f0 [ 63.209830][ T8370] blk_request_module+0x19d/0x1c0 [ 63.216517][ T8370] blkdev_get_no_open+0x5c/0x220 [ 63.223454][ T8370] blkdev_get_by_dev+0x82/0x640 [ 63.229745][ T8370] blkdev_open+0x132/0x2c0 [ 63.236009][ T8370] do_dentry_open+0x7cb/0x1010 [ 63.242781][ T8370] path_openat+0x28e6/0x39b0 [ 63.249171][ T8370] do_filp_open+0x221/0x460 [ 63.255182][ T8370] do_sys_openat2+0x124/0x460 [ 63.260944][ T8370] __x64_sys_openat+0x243/0x290 [ 63.266942][ T8370] do_syscall_64+0x3f/0xb0 [ 63.272073][ T8370] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 63.278995][ T8370] [ 63.278995][ T8370] other info that might help us debug this: [ 63.278995][ T8370] [ 63.290274][ T8370] Chain exists of: [ 63.290274][ T8370] brd_devices_mutex --> mtd_table_mutex --> major_names_lock [ 63.290274][ T8370] [ 63.305004][ T8370] Possible unsafe locking scenario: [ 63.305004][ T8370] [ 63.312986][ T8370] CPU0 CPU1 [ 63.318549][ T8370] ---- ---- [ 63.324701][ T8370] lock(major_names_lock); [ 63.329890][ T8370] lock(mtd_table_mutex); [ 63.338040][ T8370] lock(major_names_lock); [ 63.345938][ T8370] lock(brd_devices_mutex); [ 63.351058][ T8370] [ 63.351058][ T8370] *** DEADLOCK *** [ 63.351058][ T8370] [ 63.360797][ T8370] 1 lock held by syz-executor702/8370: [ 63.366524][ T8370] #0: ffffffff8d2d3f08 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x2f/0x1c0 [ 63.376615][ T8370] [ 63.376615][ T8370] stack backtrace: [ 63.382776][ T8370] CPU: 1 PID: 8370 Comm: syz-executor702 Not tainted 5.12.0-syzkaller #0 [ 63.391589][ T8370] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 63.402158][ T8370] Call Trace: [ 63.405546][ T8370] dump_stack+0x202/0x31e [ 63.410319][ T8370] ? show_regs_print_info+0x12/0x12 [ 63.415612][ T8370] ? log_buf_vmcoreinfo_setup+0x498/0x498 [ 63.422136][ T8370] ? save_trace+0x5a/0x9f0 [ 63.426999][ T8370] print_circular_bug+0xb17/0xdc0 [ 63.432406][ T8370] ? hlock_conflict+0x1f0/0x1f0 [ 63.437761][ T8370] ? __bfs+0x369/0x700 [ 63.441952][ T8370] ? check_path+0x40/0x40 [ 63.446807][ T8370] ? noop_count+0x30/0x30 [ 63.451306][ T8370] ? save_trace+0x5a/0x9f0 [ 63.456238][ T8370] check_noncircular+0x2cc/0x390 [ 63.461957][ T8370] ? add_chain_block+0x850/0x850 [ 63.467057][ T8370] check_prevs_add+0x4d6/0x5a90 [ 63.472609][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.477106][ T8370] ? reacquire_held_locks+0x5f0/0x5f0 [ 63.482735][ T8370] ? trace_lock_acquire+0x180/0x180 [ 63.488824][ T8370] ? rcu_lock_release+0x5/0x20 [ 63.494785][ T8370] ? __lock_acquire+0x6040/0x6040 [ 63.500080][ T8370] ? stack_trace_save+0x1e0/0x1e0 [ 63.505462][ T8370] ? stack_trace_save+0x1e0/0x1e0 [ 63.511019][ T8370] ? is_bpf_text_address+0x253/0x270 [ 63.517314][ T8370] ? stack_trace_save+0x1e0/0x1e0 [ 63.522842][ T8370] ? __kernel_text_address+0x93/0x100 [ 63.528328][ T8370] ? __lock_acquire+0x13b0/0x6040 [ 63.534141][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.539454][ T8370] ? trace_lock_acquire+0x180/0x180 [ 63.545377][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.550504][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.555278][ T8370] ? __lock_acquire+0x6040/0x6040 [ 63.560982][ T8370] ? __bfs+0x700/0x700 [ 63.565658][ T8370] ? __bfs+0x700/0x700 [ 63.570204][ T8370] ? rcu_lock_release+0x5/0x20 [ 63.575303][ T8370] ? stack_trace_save+0x1e0/0x1e0 [ 63.580854][ T8370] ? rcu_read_lock_sched_held+0x87/0x110 [ 63.587047][ T8370] ? lockdep_lock+0x102/0x2c0 [ 63.592201][ T8370] ? lockdep_count_forward_deps+0x240/0x240 [ 63.599496][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.605335][ T8370] ? mark_lock+0x199/0x1eb0 [ 63.610821][ T8370] __lock_acquire+0x4307/0x6040 [ 63.616780][ T8370] ? trace_lock_acquire+0x180/0x180 [ 63.623125][ T8370] ? trace_lock_acquire+0x180/0x180 [ 63.629442][ T8370] ? unwind_get_return_address+0x48/0x80 [ 63.635432][ T8370] ? arch_stack_walk+0x98/0xe0 [ 63.640861][ T8370] ? __lock_acquire+0x147f/0x6040 [ 63.646871][ T8370] ? rcu_read_lock_sched_held+0x87/0x110 [ 63.653904][ T8370] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 63.661055][ T8370] ? rcu_read_lock_sched_held+0x87/0x110 [ 63.666968][ T8370] lock_acquire+0x17f/0x720 [ 63.672101][ T8370] ? brd_probe+0x3a/0x1f0 [ 63.678013][ T8370] ? read_lock_is_recursive+0x10/0x10 [ 63.683962][ T8370] ? read_lock_is_recursive+0x10/0x10 [ 63.689425][ T8370] ? __might_sleep+0x100/0x100 [ 63.695148][ T8370] ? __might_sleep+0x100/0x100 [ 63.701055][ T8370] __mutex_lock_common+0x1bd/0x2e50 [ 63.706345][ T8370] ? brd_probe+0x3a/0x1f0 [ 63.711151][ T8370] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 63.718145][ T8370] ? brd_probe+0x3a/0x1f0 [ 63.723665][ T8370] ? mutex_lock_io_nested+0x60/0x60 [ 63.729375][ T8370] ? mutex_lock_io_nested+0x60/0x60 [ 63.735524][ T8370] ? __up_read+0x264/0x790 [ 63.741011][ T8370] ? __lock_acquire+0x6040/0x6040 [ 63.747925][ T8370] ? up_read+0x20/0x20 [ 63.753184][ T8370] mutex_lock_nested+0x1a/0x20 [ 63.758828][ T8370] brd_probe+0x3a/0x1f0 [ 63.763941][ T8370] ? brd_free+0x400/0x400 [ 63.769829][ T8370] blk_request_module+0x19d/0x1c0 [ 63.775789][ T8370] blkdev_get_no_open+0x5c/0x220 [ 63.781172][ T8370] blkdev_get_by_dev+0x82/0x640 [ 63.786668][ T8370] blkdev_open+0x132/0x2c0 [ 63.792526][ T8370] ? block_ioctl+0xf0/0xf0 [ 63.796963][ T8370] do_dentry_open+0x7cb/0x1010 [ 63.802081][ T8370] path_openat+0x28e6/0x39b0 [ 63.807129][ T8370] ? do_filp_open+0x460/0x460 [ 63.812334][ T8370] ? alloc_fd+0x583/0x620 [ 63.817377][ T8370] ? rcu_read_lock_sched_held+0x87/0x110 [ 63.823753][ T8370] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 63.830975][ T8370] do_filp_open+0x221/0x460 [ 63.836189][ T8370] ? vfs_tmpfile+0x230/0x230 [ 63.841490][ T8370] ? alloc_fd+0x583/0x620 [ 63.846467][ T8370] ? do_raw_spin_unlock+0x134/0x8a0 [ 63.852662][ T8370] ? alloc_fd+0x583/0x620 [ 63.858160][ T8370] do_sys_openat2+0x124/0x460 [ 63.863855][ T8370] ? __context_tracking_exit+0x7a/0xd0 [ 63.869667][ T8370] ? do_sys_open+0x220/0x220 [ 63.874617][ T8370] __x64_sys_openat+0x243/0x290 [ 63.879820][ T8370] ? __ia32_sys_open+0x270/0x270 [ 63.885000][ T8370] ? syscall_enter_from_user_mode+0x2e/0x1c0 [ 63.891912][ T8370] ? lockdep_hardirqs_on+0x8d/0x130 [ 63.897855][ T8370] ? syscall_enter_from_user_mode+0x2e/0x1c0 [ 63.904454][ T8370] do_syscall_64+0x3f/0xb0 [ 63.909237][ T8370] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 63.916265][ T8370] RIP: 0033:0x445359 [ 63.921284][ T8370] 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 [ 63.944958][ T8370] RSP: 002b:00007f921850a2f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 63.954085][ T8370] RAX: ffffffffffffffda RBX: 00000000004cc4f0 RCX: 0000000000445359 [ 63.962959][ T8370] RDX: 0000000000000000 RSI: 0000000020002040 RDI: 00000000ffffff9c [