Warning: Permanently added '10.128.0.176' (ECDSA) to the list of known hosts. executing program [ 35.609460] BTRFS: device fsid 24c7a497-3402-47dd-bef8-82358f5f30e0 devid 1 transid 8 /dev/loop0 [ 35.628351] BTRFS info (device loop0): using free space tree [ 35.634631] BTRFS info (device loop0): has skinny extents [ 35.684904] [ 35.686565] ====================================================== [ 35.692900] WARNING: possible circular locking dependency detected [ 35.699208] 4.19.211-syzkaller #0 Not tainted [ 35.703684] ------------------------------------------------------ [ 35.709981] syz-executor384/8077 is trying to acquire lock: [ 35.715751] 00000000812c091a (&fs_info->qgroup_ioctl_lock){+.+.}, at: btrfs_limit_qgroup+0x63/0x7b0 [ 35.724923] [ 35.724923] but task is already holding lock: [ 35.730868] 000000004ada04b8 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 35.738822] [ 35.738822] which lock already depends on the new lock. [ 35.738822] [ 35.747112] [ 35.747112] the existing dependency chain (in reverse order) is: [ 35.754708] [ 35.754708] -> #1 (sb_internal#2){.+.+}: [ 35.760241] start_transaction+0xa37/0xf90 [ 35.764975] btrfs_quota_enable+0x169/0x10b0 [ 35.769900] btrfs_ioctl+0x622c/0x76d0 [ 35.774287] do_vfs_ioctl+0xcdb/0x12e0 [ 35.778672] ksys_ioctl+0x9b/0xc0 [ 35.782626] __x64_sys_ioctl+0x6f/0xb0 [ 35.787015] do_syscall_64+0xf9/0x620 [ 35.791314] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.796997] [ 35.796997] -> #0 (&fs_info->qgroup_ioctl_lock){+.+.}: [ 35.803740] __mutex_lock+0xd7/0x1190 [ 35.808039] btrfs_limit_qgroup+0x63/0x7b0 [ 35.812777] btrfs_ioctl+0x3c0c/0x76d0 [ 35.817162] do_vfs_ioctl+0xcdb/0x12e0 [ 35.821545] ksys_ioctl+0x9b/0xc0 [ 35.825498] __x64_sys_ioctl+0x6f/0xb0 [ 35.829909] do_syscall_64+0xf9/0x620 [ 35.834220] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.839915] [ 35.839915] other info that might help us debug this: [ 35.839915] [ 35.848037] Possible unsafe locking scenario: [ 35.848037] [ 35.854162] CPU0 CPU1 [ 35.858802] ---- ---- [ 35.863442] lock(sb_internal#2); [ 35.866961] lock(&fs_info->qgroup_ioctl_lock); [ 35.874214] lock(sb_internal#2); [ 35.880246] lock(&fs_info->qgroup_ioctl_lock); [ 35.884974] [ 35.884974] *** DEADLOCK *** [ 35.884974] [ 35.891012] 2 locks held by syz-executor384/8077: [ 35.895854] #0: 0000000083b8751f (sb_writers#11){.+.+}, at: mnt_want_write_file+0x63/0x1d0 [ 35.904345] #1: 000000004ada04b8 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 35.912742] [ 35.912742] stack backtrace: [ 35.917226] CPU: 1 PID: 8077 Comm: syz-executor384 Not tainted 4.19.211-syzkaller #0 [ 35.925080] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.934414] Call Trace: [ 35.936997] dump_stack+0x1fc/0x2ef [ 35.940607] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.946388] __lock_acquire+0x30c9/0x3ff0 [ 35.950517] ? mark_held_locks+0xf0/0xf0 [ 35.954568] lock_acquire+0x170/0x3c0 [ 35.958352] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.962858] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.967268] __mutex_lock+0xd7/0x1190 [ 35.971071] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.975471] ? join_transaction+0x2d9/0xe20 [ 35.979770] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.984157] ? mutex_trylock+0x1a0/0x1a0 [ 35.988197] ? lock_downgrade+0x720/0x720 [ 35.992324] ? lock_acquire+0x170/0x3c0 [ 35.996280] ? join_transaction+0x28/0xe20 [ 36.000493] ? do_raw_spin_unlock+0x171/0x230 [ 36.005021] ? _raw_spin_unlock+0x29/0x40 [ 36.009156] ? join_transaction+0x1b7/0xe20 [ 36.013456] ? btrfs_record_root_in_trans+0x13c/0x190 [ 36.018625] btrfs_limit_qgroup+0x63/0x7b0 [ 36.022843] btrfs_ioctl+0x3c0c/0x76d0 [ 36.026709] ? is_bpf_text_address+0xfc/0x1b0 [ 36.031182] ? kernel_text_address+0xbd/0xf0 [ 36.035571] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 36.041279] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.046624] ? __save_stack_trace+0xaf/0x190 [ 36.051015] ? check_preemption_disabled+0x41/0x280 [ 36.056013] ? trace_hardirqs_off+0x64/0x200 [ 36.060548] ? __kasan_slab_free+0x186/0x1f0 [ 36.064942] ? kmem_cache_free+0x7f/0x260 [ 36.069074] ? putname+0xe1/0x120 [ 36.072507] ? do_sys_open+0x2ba/0x520 [ 36.076376] ? do_syscall_64+0xf9/0x620 [ 36.080334] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.085681] ? mark_held_locks+0xf0/0xf0 [ 36.089719] ? mark_held_locks+0xf0/0xf0 [ 36.093770] ? __lock_acquire+0x6de/0x3ff0 [ 36.097989] ? debug_check_no_obj_freed+0x201/0x490 [ 36.102984] ? lock_downgrade+0x720/0x720 [ 36.107130] ? lock_acquire+0x170/0x3c0 [ 36.111091] ? debug_check_no_obj_freed+0xb5/0x490 [ 36.116004] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 36.121840] do_vfs_ioctl+0xcdb/0x12e0 [ 36.125713] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 36.130800] ? debug_check_no_obj_freed+0x201/0x490 [ 36.135880] ? ioctl_preallocate+0x200/0x200 [ 36.140357] ? putname+0xe1/0x120 [ 36.143790] ? putname+0xe1/0x120 [ 36.147394] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 36.152390] ? kmem_cache_free+0x226/0x260 [ 36.156602] ? putname+0xe1/0x120 [ 36.160032] ? do_sys_open+0x2bf/0x520 [ 36.163897] ? filp_open+0x70/0x70 [ 36.167413] ksys_ioctl+0x9b/0xc0 [ 36.170880] __x64_sys_ioctl+0x6f/0xb0 [ 36.174759] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 36.179320] do_syscall_64+0xf9/0x620 [ 36.183103] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.188277] RIP: 0033:0x7f84af920859 [ 36.191983] 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 [ 36.210973] RSP: 002b:00007ffc7574ce88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 36.218660] RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f84af920859 [ 36.225922] RDX: 0000000020001140 RSI: 000000008030942b RDI: 0000000000000004 [ 36.233177] RBP: 00007f84af8e00f0 R08: 00000