Warning: Permanently added '10.128.0.46' (ED25519) to the list of known hosts. executing program [ 40.198305][ T3973] loop0: detected capacity change from 0 to 32768 [ 40.284574][ T3973] BTRFS: device fsid 5e4b7888-5e56-43f0-8345-635ad0fd87c6 devid 1 transid 8 /dev/loop0 scanned by syz-executor242 (3973) [ 40.337003][ T3973] BTRFS info (device loop0): using blake2b (blake2b-256-generic) checksum algorithm [ 40.339842][ T3973] BTRFS info (device loop0): using free space tree [ 40.341893][ T3973] BTRFS info (device loop0): has skinny extents [ 40.359732][ T3973] BTRFS info (device loop0): enabling ssd optimizations executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 69.644921][ T7] cfg80211: failed to load regulatory.db executing program executing program executing program executing program executing program executing program [ 70.926594][ T3994] [ 70.927272][ T3994] ====================================================== [ 70.929035][ T3994] WARNING: possible circular locking dependency detected [ 70.930877][ T3994] 5.15.163-syzkaller #0 Not tainted [ 70.932235][ T3994] ------------------------------------------------------ [ 70.934151][ T3994] btrfs-transacti/3994 is trying to acquire lock: [ 70.935932][ T3994] ffff0000ce8078e0 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: btrfs_run_dev_stats+0xe4/0xe24 [ 70.938700][ T3994] [ 70.938700][ T3994] but task is already holding lock: [ 70.940689][ T3994] ffff0000da400720 (&fs_info->tree_log_mutex){+.+.}-{3:3}, at: btrfs_commit_transaction+0xe34/0x30f0 [ 70.943634][ T3994] [ 70.943634][ T3994] which lock already depends on the new lock. [ 70.943634][ T3994] [ 70.946317][ T3994] [ 70.946317][ T3994] the existing dependency chain (in reverse order) is: [ 70.948732][ T3994] [ 70.948732][ T3994] -> #4 (&fs_info->tree_log_mutex){+.+.}-{3:3}: [ 70.951012][ T3994] __mutex_lock_common+0x194/0x2154 [ 70.952496][ T3994] mutex_lock_nested+0xa4/0xf8 [ 70.953881][ T3994] btrfs_commit_transaction+0xe34/0x30f0 [ 70.955570][ T3994] transaction_kthread+0x284/0x3f4 [ 70.957077][ T3994] kthread+0x37c/0x45c [ 70.958285][ T3994] ret_from_fork+0x10/0x20 [ 70.959523][ T3994] [ 70.959523][ T3994] -> #3 (&fs_info->reloc_mutex){+.+.}-{3:3}: [ 70.961562][ T3994] __mutex_lock_common+0x194/0x2154 [ 70.963077][ T3994] mutex_lock_nested+0xa4/0xf8 [ 70.964417][ T3994] start_transaction+0x450/0x1480 [ 70.965907][ T3994] btrfs_start_transaction+0x34/0x44 [ 70.967422][ T3994] btrfs_create+0x134/0x56c [ 70.968772][ T3994] path_openat+0xf18/0x26cc [ 70.970149][ T3994] do_filp_open+0x1a8/0x3b4 [ 70.971511][ T3994] do_sys_openat2+0x128/0x3e0 [ 70.972950][ T3994] __arm64_sys_openat+0x1f0/0x240 [ 70.974485][ T3994] invoke_syscall+0x98/0x2b8 [ 70.975917][ T3994] el0_svc_common+0x138/0x258 [ 70.977310][ T3994] do_el0_svc+0x58/0x14c [ 70.978578][ T3994] el0_svc+0x7c/0x1f0 [ 70.979783][ T3994] el0t_64_sync_handler+0x84/0xe4 [ 70.981244][ T3994] el0t_64_sync+0x1a0/0x1a4 [ 70.982597][ T3994] [ 70.982597][ T3994] -> #2 (sb_internal#2){.+.+}-{0:0}: [ 70.984665][ T3994] start_transaction+0x644/0x1480 [ 70.986443][ T3994] btrfs_start_transaction+0x34/0x44 [ 70.987999][ T3994] btrfs_create+0x134/0x56c [ 70.989334][ T3994] path_openat+0xf18/0x26cc [ 70.990708][ T3994] do_filp_open+0x1a8/0x3b4 [ 70.992119][ T3994] do_sys_openat2+0x128/0x3e0 [ 70.993592][ T3994] __arm64_sys_openat+0x1f0/0x240 [ 70.995093][ T3994] invoke_syscall+0x98/0x2b8 [ 70.996570][ T3994] el0_svc_common+0x138/0x258 [ 70.997991][ T3994] do_el0_svc+0x58/0x14c [ 70.999265][ T3994] el0_svc+0x7c/0x1f0 [ 71.000501][ T3994] el0t_64_sync_handler+0x84/0xe4 [ 71.002005][ T3994] el0t_64_sync+0x1a0/0x1a4 [ 71.003418][ T3994] [ 71.003418][ T3994] -> #1 (&type->i_mutex_dir_key#6){++++}-{3:3}: [ 71.005676][ T3994] down_read+0xc0/0x398 [ 71.006989][ T3994] lookup_slow+0x50/0x84 [ 71.008303][ T3994] walk_component+0x394/0x4cc [ 71.009680][ T3994] path_lookupat+0x13c/0x3d0 [ 71.011125][ T3994] filename_lookup+0x1c4/0x4c8 [ 71.012846][ T3994] kern_path+0x4c/0x194 [ 71.014281][ T3994] lookup_bdev+0xc0/0x25c [ 71.015750][ T3994] btrfs_free_stale_devices+0x658/0x9ec [ 71.017669][ T3994] btrfs_forget_devices+0x5c/0x98 [ 71.019418][ T3994] btrfs_control_ioctl+0x12c/0x248 [ 71.021190][ T3994] __arm64_sys_ioctl+0x14c/0x1c8 [ 71.023037][ T3994] invoke_syscall+0x98/0x2b8 [ 71.024852][ T3994] el0_svc_common+0x138/0x258 [ 71.026371][ T3994] do_el0_svc+0x58/0x14c [ 71.027802][ T3994] el0_svc+0x7c/0x1f0 [ 71.029158][ T3994] el0t_64_sync_handler+0x84/0xe4 [ 71.030752][ T3994] el0t_64_sync+0x1a0/0x1a4 [ 71.032236][ T3994] [ 71.032236][ T3994] -> #0 (&fs_devs->device_list_mutex){+.+.}-{3:3}: [ 71.034688][ T3994] __lock_acquire+0x32d4/0x7638 [ 71.036307][ T3994] lock_acquire+0x240/0x77c [ 71.037868][ T3994] __mutex_lock_common+0x194/0x2154 [ 71.039477][ T3994] mutex_lock_nested+0xa4/0xf8 [ 71.040969][ T3994] btrfs_run_dev_stats+0xe4/0xe24 [ 71.042580][ T3994] commit_cowonly_roots+0x17c/0x808 [ 71.044097][ T3994] btrfs_commit_transaction+0xef4/0x30f0 [ 71.045742][ T3994] transaction_kthread+0x284/0x3f4 [ 71.047411][ T3994] kthread+0x37c/0x45c [ 71.048666][ T3994] ret_from_fork+0x10/0x20 [ 71.050003][ T3994] [ 71.050003][ T3994] other info that might help us debug this: [ 71.050003][ T3994] [ 71.052733][ T3994] Chain exists of: [ 71.052733][ T3994] &fs_devs->device_list_mutex --> &fs_info->reloc_mutex --> &fs_info->tree_log_mutex [ 71.052733][ T3994] [ 71.056881][ T3994] Possible unsafe locking scenario: [ 71.056881][ T3994] [ 71.058948][ T3994] CPU0 CPU1 [ 71.060304][ T3994] ---- ---- [ 71.061787][ T3994] lock(&fs_info->tree_log_mutex); [ 71.063182][ T3994] lock(&fs_info->reloc_mutex); [ 71.065211][ T3994] lock(&fs_info->tree_log_mutex); [ 71.067230][ T3994] lock(&fs_devs->device_list_mutex); [ 71.068702][ T3994] [ 71.068702][ T3994] *** DEADLOCK *** [ 71.068702][ T3994] [ 71.070905][ T3994] 3 locks held by btrfs-transacti/3994: [ 71.072313][ T3994] #0: ffff0000da4007b0 (&fs_info->transaction_kthread_mutex){+.+.}-{3:3}, at: transaction_kthread+0xd0/0x3f4 [ 71.075510][ T3994] #1: ffff0000da400c90 (&fs_info->reloc_mutex){+.+.}-{3:3}, at: btrfs_commit_transaction+0xd9c/0x30f0 [ 71.078626][ T3994] #2: ffff0000da400720 (&fs_info->tree_log_mutex){+.+.}-{3:3}, at: btrfs_commit_transaction+0xe34/0x30f0 [ 71.081776][ T3994] [ 71.081776][ T3994] stack backtrace: [ 71.083346][ T3994] CPU: 0 PID: 3994 Comm: btrfs-transacti Not tainted 5.15.163-syzkaller #0 [ 71.085616][ T3994] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 [ 71.088284][ T3994] Call trace: [ 71.089145][ T3994] dump_backtrace+0x0/0x530 [ 71.090327][ T3994] show_stack+0x2c/0x3c [ 71.091455][ T3994] dump_stack_lvl+0x108/0x170 [ 71.092748][ T3994] dump_stack+0x1c/0x58 [ 71.093862][ T3994] print_circular_bug+0x150/0x1b8 [ 71.095357][ T3994] check_noncircular+0x2cc/0x378 [ 71.096712][ T3994] __lock_acquire+0x32d4/0x7638 [ 71.098114][ T3994] lock_acquire+0x240/0x77c [ 71.099308][ T3994] __mutex_lock_common+0x194/0x2154 [ 71.100756][ T3994] mutex_lock_nested+0xa4/0xf8 [ 71.102093][ T3994] btrfs_run_dev_stats+0xe4/0xe24 [ 71.103417][ T3994] commit_cowonly_roots+0x17c/0x808 [ 71.104821][ T3994] btrfs_commit_transaction+0xef4/0x30f0 [ 71.106349][ T3994] transaction_kthread+0x284/0x3f4 [ 71.107685][ T3994] kthread+0x37c/0x45c [ 71.108776][ T3994] ret_from_fork+0x10/0x20 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program