[ OK ] Started Serial Getty on ttyS0. [ OK ] Started Getty on tty3. [ OK ] Started Getty on tty2. [ OK ] Started OpenBSD Secure Shell server. [ OK ] Started getty on tty2-tty6 if dbus and logind are not available. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.155' (ECDSA) to the list of known hosts. executing program executing program executing program executing program executing program executing program executing program executing program executing program syzkaller login: [ 56.246621][ T8445] [ 56.249055][ T8445] ====================================================== [ 56.256769][ T8445] WARNING: possible circular locking dependency detected [ 56.264002][ T8445] 5.13.0-rc5-syzkaller #0 Not tainted [ 56.269506][ T8445] ------------------------------------------------------ [ 56.276750][ T8445] systemd-udevd/8445 is trying to acquire lock: [ 56.284266][ T8445] ffffffff8d671688 (loop_ctl_mutex){+.+.}-{3:3}, at: loop_probe+0xe1/0x220 [ 56.293859][ T8445] [ 56.293859][ T8445] but task is already holding lock: [ 56.302136][ T8445] ffffffff8d4db008 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x2f/0x1c0 [ 56.312857][ T8445] [ 56.312857][ T8445] which lock already depends on the new lock. [ 56.312857][ T8445] [ 56.323301][ T8445] [ 56.323301][ T8445] the existing dependency chain (in reverse order) is: [ 56.332310][ T8445] [ 56.332310][ T8445] -> #3 (major_names_lock){+.+.}-{3:3}: [ 56.340038][ T8445] lock_acquire+0x17f/0x720 [ 56.345330][ T8445] __mutex_lock_common+0x1bf/0x3100 [ 56.351180][ T8445] mutex_lock_nested+0x1a/0x20 [ 56.356475][ T8445] __register_blkdev+0x2c/0x360 [ 56.361846][ T8445] register_mtd_blktrans+0x94/0x3d0 [ 56.367678][ T8445] do_one_initcall+0x1a7/0x400 [ 56.373439][ T8445] do_initcall_level+0x14a/0x1f5 [ 56.379095][ T8445] do_initcalls+0x4b/0x8c [ 56.383960][ T8445] kernel_init_freeable+0x3fd/0x58a [ 56.389701][ T8445] kernel_init+0xd/0x290 [ 56.394587][ T8445] ret_from_fork+0x1f/0x30 [ 56.399536][ T8445] [ 56.399536][ T8445] -> #2 (mtd_table_mutex){+.+.}-{3:3}: [ 56.407188][ T8445] lock_acquire+0x17f/0x720 [ 56.412224][ T8445] __mutex_lock_common+0x1bf/0x3100 [ 56.418079][ T8445] mutex_lock_nested+0x1a/0x20 [ 56.423397][ T8445] blktrans_open+0x61/0x430 [ 56.428426][ T8445] __blkdev_get+0x293/0xa50 [ 56.433534][ T8445] blkdev_get_by_dev+0xf9/0x640 [ 56.438909][ T8445] blkdev_open+0x132/0x2c0 [ 56.443863][ T8445] do_dentry_open+0x7cb/0x1010 [ 56.449149][ T8445] path_openat+0x28e6/0x39b0 [ 56.454270][ T8445] do_filp_open+0x221/0x460 [ 56.459303][ T8445] do_sys_openat2+0x124/0x460 [ 56.464541][ T8445] __x64_sys_open+0x221/0x270 [ 56.469767][ T8445] do_syscall_64+0x3f/0xb0 [ 56.474816][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 56.481255][ T8445] [ 56.481255][ T8445] -> #1 (&bdev->bd_mutex){+.+.}-{3:3}: [ 56.489095][ T8445] lock_acquire+0x17f/0x720 [ 56.494127][ T8445] __mutex_lock_common+0x1bf/0x3100 [ 56.499883][ T8445] mutex_lock_nested+0x1a/0x20 [ 56.505262][ T8445] del_gendisk+0x2ab/0x860 [ 56.510215][ T8445] loop_control_ioctl+0x62c/0x770 [ 56.515974][ T8445] __se_sys_ioctl+0xfb/0x170 [ 56.521203][ T8445] do_syscall_64+0x3f/0xb0 [ 56.526260][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 56.533155][ T8445] [ 56.533155][ T8445] -> #0 (loop_ctl_mutex){+.+.}-{3:3}: [ 56.540726][ T8445] check_prevs_add+0x4f9/0x5b60 [ 56.546223][ T8445] __lock_acquire+0x4307/0x6040 [ 56.551773][ T8445] lock_acquire+0x17f/0x720 [ 56.556902][ T8445] __mutex_lock_common+0x1bf/0x3100 [ 56.562638][ T8445] mutex_lock_nested+0x1a/0x20 [ 56.568021][ T8445] loop_probe+0xe1/0x220 [ 56.572787][ T8445] blk_request_module+0x19d/0x1c0 [ 56.578362][ T8445] blkdev_get_no_open+0x44/0x1f0 [ 56.583825][ T8445] blkdev_get_by_dev+0x82/0x640 [ 56.589197][ T8445] blkdev_open+0x132/0x2c0 [ 56.594136][ T8445] do_dentry_open+0x7cb/0x1010 [ 56.599522][ T8445] path_openat+0x28e6/0x39b0 [ 56.604636][ T8445] do_filp_open+0x221/0x460 [ 56.609658][ T8445] do_sys_openat2+0x124/0x460 [ 56.615013][ T8445] __x64_sys_open+0x221/0x270 [ 56.620223][ T8445] do_syscall_64+0x3f/0xb0 [ 56.625171][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 56.631588][ T8445] [ 56.631588][ T8445] other info that might help us debug this: [ 56.631588][ T8445] [ 56.641932][ T8445] Chain exists of: [ 56.641932][ T8445] loop_ctl_mutex --> mtd_table_mutex --> major_names_lock [ 56.641932][ T8445] [ 56.655340][ T8445] Possible unsafe locking scenario: [ 56.655340][ T8445] [ 56.663441][ T8445] CPU0 CPU1 [ 56.669046][ T8445] ---- ---- [ 56.674452][ T8445] lock(major_names_lock); [ 56.679071][ T8445] lock(mtd_table_mutex); [ 56.686311][ T8445] lock(major_names_lock); [ 56.693346][ T8445] lock(loop_ctl_mutex); [ 56.698043][ T8445] [ 56.698043][ T8445] *** DEADLOCK *** [ 56.698043][ T8445] [ 56.706387][ T8445] 1 lock held by systemd-udevd/8445: [ 56.711874][ T8445] #0: ffffffff8d4db008 (major_names_lock){+.+.}-{3:3}, at: blk_request_module+0x2f/0x1c0 [ 56.721826][ T8445] [ 56.721826][ T8445] stack backtrace: [ 56.727996][ T8445] CPU: 1 PID: 8445 Comm: systemd-udevd Not tainted 5.13.0-rc5-syzkaller #0 [ 56.736691][ T8445] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 56.746874][ T8445] Call Trace: [ 56.750168][ T8445] dump_stack+0x202/0x31e [ 56.754533][ T8445] ? show_regs_print_info+0x12/0x12 [ 56.760008][ T8445] ? log_buf_vmcoreinfo_setup+0x498/0x498 [ 56.765750][ T8445] ? save_trace+0x5a/0x9f0 [ 56.770182][ T8445] print_circular_bug+0xb17/0xdc0 [ 56.775260][ T8445] ? hlock_conflict+0x1f0/0x1f0 [ 56.780112][ T8445] ? __bfs+0x369/0x700 [ 56.784187][ T8445] ? check_path+0x40/0x40 [ 56.788524][ T8445] ? noop_count+0x30/0x30 [ 56.792859][ T8445] ? save_trace+0x5a/0x9f0 [ 56.797311][ T8445] check_noncircular+0x2cc/0x390 [ 56.802429][ T8445] ? add_chain_block+0x850/0x850 [ 56.807396][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.811994][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.816506][ T8445] ? __bfs+0x700/0x700 [ 56.820611][ T8445] check_prevs_add+0x4f9/0x5b60 [ 56.825648][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.830165][ T8445] ? __bfs+0x700/0x700 [ 56.834261][ T8445] ? __lock_acquire+0x438b/0x6040 [ 56.839286][ T8445] ? reacquire_held_locks+0x5f0/0x5f0 [ 56.845120][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.849716][ T8445] ? lockdep_unlock+0x145/0x2e0 [ 56.854679][ T8445] ? __lock_acquire+0x147f/0x6040 [ 56.859732][ T8445] ? __lock_acquire+0x147f/0x6040 [ 56.864802][ T8445] ? __lock_acquire+0x13b0/0x6040 [ 56.869894][ T8445] ? trace_lock_acquire+0x180/0x180 [ 56.875186][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.879694][ T8445] ? __bfs+0x700/0x700 [ 56.883960][ T8445] ? mark_lock+0x199/0x1eb0 [ 56.888711][ T8445] ? __bfs+0x700/0x700 [ 56.893458][ T8445] ? lockdep_lock+0x102/0x2c0 [ 56.898278][ T8445] ? lockdep_count_forward_deps+0x240/0x240 [ 56.905082][ T8445] ? stack_trace_save+0x1e0/0x1e0 [ 56.910118][ T8445] ? rcu_read_lock_sched_held+0x87/0x110 [ 56.915761][ T8445] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 56.921793][ T8445] __lock_acquire+0x4307/0x6040 [ 56.926765][ T8445] ? __bfs+0x700/0x700 [ 56.930955][ T8445] ? rcu_lock_release+0x5/0x20 [ 56.935730][ T8445] ? trace_lock_acquire+0x180/0x180 [ 56.941025][ T8445] ? is_bpf_text_address+0x253/0x270 [ 56.946320][ T8445] ? trace_lock_acquire+0x180/0x180 [ 56.951651][ T8445] ? arch_stack_walk+0x98/0xe0 [ 56.956448][ T8445] ? rcu_read_lock_sched_held+0x87/0x110 [ 56.962107][ T8445] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 56.968198][ T8445] lock_acquire+0x17f/0x720 [ 56.972713][ T8445] ? loop_probe+0xe1/0x220 [ 56.977143][ T8445] ? read_lock_is_recursive+0x10/0x10 [ 56.982524][ T8445] ? __might_sleep+0x100/0x100 [ 56.987401][ T8445] ? read_lock_is_recursive+0x10/0x10 [ 56.992899][ T8445] __mutex_lock_common+0x1bf/0x3100 [ 56.998109][ T8445] ? loop_probe+0xe1/0x220 [ 57.002535][ T8445] ? ilookup+0x9b/0x220 [ 57.006702][ T8445] ? loop_probe+0xe1/0x220 [ 57.011123][ T8445] ? rcu_read_lock_sched_held+0x87/0x110 [ 57.016776][ T8445] ? mutex_lock_io_nested+0x60/0x60 [ 57.021993][ T8445] ? __mutex_lock_common+0x568/0x3100 [ 57.027470][ T8445] ? blk_request_module+0x2f/0x1c0 [ 57.032710][ T8445] ? mutex_lock_io_nested+0x60/0x60 [ 57.038099][ T8445] mutex_lock_nested+0x1a/0x20 [ 57.043765][ T8445] loop_probe+0xe1/0x220 [ 57.048135][ T8445] ? loop_info64_to_compat+0x5b0/0x5b0 [ 57.053605][ T8445] ? do_raw_spin_unlock+0x134/0x8a0 [ 57.058834][ T8445] ? loop_info64_to_compat+0x5b0/0x5b0 [ 57.064298][ T8445] blk_request_module+0x19d/0x1c0 [ 57.069327][ T8445] blkdev_get_no_open+0x44/0x1f0 [ 57.074384][ T8445] blkdev_get_by_dev+0x82/0x640 [ 57.079242][ T8445] blkdev_open+0x132/0x2c0 [ 57.083661][ T8445] ? block_ioctl+0xf0/0xf0 [ 57.088075][ T8445] do_dentry_open+0x7cb/0x1010 [ 57.092871][ T8445] path_openat+0x28e6/0x39b0 [ 57.097484][ T8445] ? do_filp_open+0x460/0x460 [ 57.102259][ T8445] ? alloc_fd+0x5eb/0x690 [ 57.106615][ T8445] ? rcu_read_lock_sched_held+0x87/0x110 [ 57.113175][ T8445] ? __bpf_trace_rcu_stall_warning+0x10/0x10 [ 57.119349][ T8445] do_filp_open+0x221/0x460 [ 57.123851][ T8445] ? vfs_tmpfile+0x230/0x230 [ 57.128539][ T8445] ? alloc_fd+0x5eb/0x690 [ 57.132874][ T8445] ? do_raw_spin_unlock+0x134/0x8a0 [ 57.138078][ T8445] ? _raw_spin_unlock+0x24/0x40 [ 57.143145][ T8445] ? alloc_fd+0x5eb/0x690 [ 57.147484][ T8445] do_sys_openat2+0x124/0x460 [ 57.152199][ T8445] ? __context_tracking_exit+0x7a/0xd0 [ 57.160051][ T8445] ? do_sys_open+0x220/0x220 [ 57.164644][ T8445] ? __context_tracking_enter+0xa5/0xf0 [ 57.170211][ T8445] __x64_sys_open+0x221/0x270 [ 57.174892][ T8445] ? do_sys_openat2+0x460/0x460 [ 57.179741][ T8445] ? vtime_user_enter+0x1ea/0x2d0 [ 57.184860][ T8445] ? __secure_computing+0x19b/0x320 [ 57.190096][ T8445] ? syscall_enter_from_user_mode+0xf0/0x1c0 [ 57.196083][ T8445] do_syscall_64+0x3f/0xb0 [ 57.200507][ T8445] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 57.208398][ T8445] RIP: 0033:0x7f666c06a840 [ 57.213168][ T8445] Code: 73 01 c3 48 8b 0d 68 77 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 89 bb 20 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 1e f6 ff ff 48 89 04 24 [ 57.233763][ T8445] RSP: 002b:00007ffc880be598 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 [ 57.242454][ T8445] RAX: ffffffffffffffda RBX: 000055dd2c8278f0 RCX: 00007f666c06a840 executing program executing program [ 57.250442][ T8445] RDX: 000055dd2c52efe3 RSI: 00000000000a0800 RDI: 000055dd2c827830 [ 57.258702][ T8445] RBP: 00007ffc880be710 R08: 000055dd2c52e670 R09: 0000000000000010 [ 57.266685][ T8445] R10: 000055dd2c52ed0c R11: 0000000000000246 R12: 00007ffc880be660 [ 57.274751][ T8445] R13: 000055dd2c829010 R14: 0000000000000003 R15: 000000000000000e executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program