Warning: Permanently added '10.128.0.224' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 37.832281] BTRFS: device fsid 24c7a497-3402-47dd-bef8-82358f5f30e0 devid 1 transid 8 /dev/loop0 [ 37.855628] BTRFS info (device loop0): using free space tree [ 37.862588] BTRFS info (device loop0): has skinny extents [ 37.908323] [ 37.909969] ====================================================== [ 37.916277] WARNING: possible circular locking dependency detected [ 37.922591] 4.19.211-syzkaller #0 Not tainted [ 37.927073] ------------------------------------------------------ [ 37.933386] syz-executor107/8064 is trying to acquire lock: [ 37.940294] 0000000027b11ccb (&fs_info->qgroup_ioctl_lock){+.+.}, at: btrfs_limit_qgroup+0x63/0x7b0 [ 37.949474] [ 37.949474] but task is already holding lock: [ 37.955426] 000000005edf660d (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 37.963383] [ 37.963383] which lock already depends on the new lock. [ 37.963383] [ 37.971679] [ 37.971679] the existing dependency chain (in reverse order) is: [ 37.979278] [ 37.979278] -> #1 (sb_internal#2){.+.+}: [ 37.984810] start_transaction+0xa37/0xf90 [ 37.989552] btrfs_quota_enable+0x169/0x10b0 [ 37.994460] btrfs_ioctl+0x622c/0x76d0 [ 37.998847] do_vfs_ioctl+0xcdb/0x12e0 [ 38.003229] ksys_ioctl+0x9b/0xc0 [ 38.007184] __x64_sys_ioctl+0x6f/0xb0 [ 38.011571] do_syscall_64+0xf9/0x620 [ 38.015869] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.021569] [ 38.021569] -> #0 (&fs_info->qgroup_ioctl_lock){+.+.}: [ 38.028311] __mutex_lock+0xd7/0x1190 [ 38.032613] btrfs_limit_qgroup+0x63/0x7b0 [ 38.037346] btrfs_ioctl+0x3c0c/0x76d0 [ 38.041818] do_vfs_ioctl+0xcdb/0x12e0 [ 38.046209] ksys_ioctl+0x9b/0xc0 [ 38.050158] __x64_sys_ioctl+0x6f/0xb0 [ 38.054544] do_syscall_64+0xf9/0x620 [ 38.059032] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.064711] [ 38.064711] other info that might help us debug this: [ 38.064711] [ 38.072843] Possible unsafe locking scenario: [ 38.072843] [ 38.078873] CPU0 CPU1 [ 38.083604] ---- ---- [ 38.088242] lock(sb_internal#2); [ 38.091759] lock(&fs_info->qgroup_ioctl_lock); [ 38.099004] lock(sb_internal#2); [ 38.105033] lock(&fs_info->qgroup_ioctl_lock); [ 38.109805] [ 38.109805] *** DEADLOCK *** [ 38.109805] [ 38.115840] 2 locks held by syz-executor107/8064: [ 38.120656] #0: 00000000fda95e56 (sb_writers#11){.+.+}, at: mnt_want_write_file+0x63/0x1d0 [ 38.129134] #1: 000000005edf660d (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 38.137520] [ 38.137520] stack backtrace: [ 38.142001] CPU: 0 PID: 8064 Comm: syz-executor107 Not tainted 4.19.211-syzkaller #0 [ 38.149855] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 38.159182] Call Trace: [ 38.161750] dump_stack+0x1fc/0x2ef [ 38.165357] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 38.171137] __lock_acquire+0x30c9/0x3ff0 [ 38.175270] ? check_preemption_disabled+0x41/0x280 [ 38.180269] ? mark_held_locks+0xf0/0xf0 [ 38.184314] ? kfree+0xcc/0x210 [ 38.187579] ? join_transaction+0x10d/0xe20 [ 38.191877] ? start_transaction+0x35f/0xf90 [ 38.196260] ? btrfs_ioctl+0x3b3d/0x76d0 [ 38.200295] ? do_vfs_ioctl+0xcdb/0x12e0 [ 38.204331] ? ksys_ioctl+0x9b/0xc0 [ 38.207936] lock_acquire+0x170/0x3c0 [ 38.211716] ? btrfs_limit_qgroup+0x63/0x7b0 [ 38.216114] ? btrfs_limit_qgroup+0x63/0x7b0 [ 38.220500] __mutex_lock+0xd7/0x1190 [ 38.224279] ? btrfs_limit_qgroup+0x63/0x7b0 [ 38.228666] ? join_transaction+0x2d9/0xe20 [ 38.232961] ? btrfs_limit_qgroup+0x63/0x7b0 [ 38.237344] ? mutex_trylock+0x1a0/0x1a0 [ 38.241396] ? lock_downgrade+0x720/0x720 [ 38.245533] ? kfree+0x110/0x210 [ 38.248880] ? join_transaction+0x10d/0xe20 [ 38.253186] ? do_raw_spin_unlock+0x171/0x230 [ 38.257665] ? _raw_spin_unlock+0x29/0x40 [ 38.261791] ? join_transaction+0x1b7/0xe20 [ 38.266087] ? btrfs_record_root_in_trans+0x13c/0x190 [ 38.271266] btrfs_limit_qgroup+0x63/0x7b0 [ 38.275482] btrfs_ioctl+0x3c0c/0x76d0 [ 38.279346] ? quarantine_put+0x191/0x1f0 [ 38.283470] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 38.289167] ? lock_acquire+0x170/0x3c0 [ 38.293122] ? quarantine_put+0x10e/0x1f0 [ 38.297248] ? do_raw_spin_unlock+0x171/0x230 [ 38.301720] ? _raw_spin_unlock+0x29/0x40 [ 38.305852] ? trace_hardirqs_off+0x64/0x200 [ 38.310247] ? __kasan_slab_free+0x186/0x1f0 [ 38.314631] ? kmem_cache_free+0x7f/0x260 [ 38.318754] ? putname+0xe1/0x120 [ 38.322182] ? do_sys_open+0x2ba/0x520 [ 38.326044] ? do_syscall_64+0xf9/0x620 [ 38.329993] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.335343] ? mark_held_locks+0xf0/0xf0 [ 38.339391] ? __lock_acquire+0x6de/0x3ff0 [ 38.343613] ? debug_check_no_obj_freed+0x201/0x490 [ 38.348611] ? lock_downgrade+0x720/0x720 [ 38.352752] ? lock_acquire+0x170/0x3c0 [ 38.356717] ? debug_check_no_obj_freed+0xb5/0x490 [ 38.361639] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 38.367342] do_vfs_ioctl+0xcdb/0x12e0 [ 38.371216] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 38.376300] ? debug_check_no_obj_freed+0x201/0x490 [ 38.381299] ? ioctl_preallocate+0x200/0x200 [ 38.385687] ? putname+0xe1/0x120 [ 38.389138] ? putname+0xe1/0x120 [ 38.392621] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 38.397620] ? kmem_cache_free+0x226/0x260 [ 38.401837] ? putname+0xe1/0x120 [ 38.405273] ? do_sys_open+0x2bf/0x520 [ 38.409233] ? filp_open+0x70/0x70 [ 38.412752] ksys_ioctl+0x9b/0xc0 [ 38.416185] __x64_sys_ioctl+0x6f/0xb0 [ 38.420054] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 38.424646] do_syscall_64+0xf9/0x620 [ 38.428429] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.433595] RIP: 0033:0x7fd45ed24859 [ 38.437287] Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 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 c0 ff ff ff f7 d8 64 89 01 48 [ 38.456166] RSP: 002b:00007ffdaf1c5088 EFLAGS: 00000