Warning: Permanently added '10.128.1.155' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 34.519387] BTRFS: device fsid 24c7a497-3402-47dd-bef8-82358f5f30e0 devid 1 transid 8 /dev/loop0 [ 34.542945] BTRFS info (device loop0): using free space tree [ 34.548810] BTRFS info (device loop0): has skinny extents [ 34.604057] [ 34.605703] ====================================================== [ 34.612026] WARNING: possible circular locking dependency detected [ 34.618318] 4.19.211-syzkaller #0 Not tainted [ 34.622783] ------------------------------------------------------ [ 34.629075] syz-executor221/8122 is trying to acquire lock: [ 34.634757] 00000000266b3a34 (&fs_info->qgroup_ioctl_lock){+.+.}, at: btrfs_create_qgroup+0x5a/0x270 [ 34.644011] [ 34.644011] but task is already holding lock: [ 34.649958] 000000005b756e52 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 34.657918] [ 34.657918] which lock already depends on the new lock. [ 34.657918] [ 34.666214] [ 34.666214] the existing dependency chain (in reverse order) is: [ 34.673808] [ 34.673808] -> #1 (sb_internal#2){.+.+}: [ 34.679331] start_transaction+0xa37/0xf90 [ 34.684066] btrfs_quota_enable+0x169/0x10b0 [ 34.688971] btrfs_ioctl+0x622c/0x76d0 [ 34.693356] do_vfs_ioctl+0xcdb/0x12e0 [ 34.697740] ksys_ioctl+0x9b/0xc0 [ 34.701810] __x64_sys_ioctl+0x6f/0xb0 [ 34.706201] do_syscall_64+0xf9/0x620 [ 34.710507] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.716194] [ 34.716194] -> #0 (&fs_info->qgroup_ioctl_lock){+.+.}: [ 34.722939] __mutex_lock+0xd7/0x1190 [ 34.727240] btrfs_create_qgroup+0x5a/0x270 [ 34.732065] btrfs_ioctl+0xcce/0x76d0 [ 34.736368] do_vfs_ioctl+0xcdb/0x12e0 [ 34.740750] ksys_ioctl+0x9b/0xc0 [ 34.744700] __x64_sys_ioctl+0x6f/0xb0 [ 34.749083] do_syscall_64+0xf9/0x620 [ 34.753384] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.759065] [ 34.759065] other info that might help us debug this: [ 34.759065] [ 34.767187] Possible unsafe locking scenario: [ 34.767187] [ 34.773220] CPU0 CPU1 [ 34.777860] ---- ---- [ 34.782500] lock(sb_internal#2); [ 34.786016] lock(&fs_info->qgroup_ioctl_lock); [ 34.793264] lock(sb_internal#2); [ 34.799295] lock(&fs_info->qgroup_ioctl_lock); [ 34.804026] [ 34.804026] *** DEADLOCK *** [ 34.804026] [ 34.810063] 2 locks held by syz-executor221/8122: [ 34.814877] #0: 000000005aca81aa (sb_writers#11){.+.+}, at: mnt_want_write_file+0x63/0x1d0 [ 34.823357] #1: 000000005b756e52 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 34.831742] [ 34.831742] stack backtrace: [ 34.836220] CPU: 0 PID: 8122 Comm: syz-executor221 Not tainted 4.19.211-syzkaller #0 [ 34.844071] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 34.853407] Call Trace: [ 34.855978] dump_stack+0x1fc/0x2ef [ 34.859588] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 34.865367] __lock_acquire+0x30c9/0x3ff0 [ 34.869497] ? mark_held_locks+0xf0/0xf0 [ 34.873538] ? btrfs_record_root_in_trans+0x122/0x190 [ 34.878706] lock_acquire+0x170/0x3c0 [ 34.882497] ? btrfs_create_qgroup+0x5a/0x270 [ 34.886972] ? btrfs_create_qgroup+0x5a/0x270 [ 34.891444] __mutex_lock+0xd7/0x1190 [ 34.895219] ? btrfs_create_qgroup+0x5a/0x270 [ 34.899694] ? btrfs_create_qgroup+0x5a/0x270 [ 34.904168] ? mutex_trylock+0x1a0/0x1a0 [ 34.908205] ? wait_for_completion_io+0x10/0x10 [ 34.912853] ? record_root_in_trans.isra.0+0x327/0x400 [ 34.918104] ? btrfs_record_root_in_trans+0x13c/0x190 [ 34.923271] btrfs_create_qgroup+0x5a/0x270 [ 34.927572] btrfs_ioctl+0xcce/0x76d0 [ 34.931359] ? is_bpf_text_address+0xfc/0x1b0 [ 34.935832] ? kernel_text_address+0xbd/0xf0 [ 34.940216] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 34.945904] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.951242] ? __save_stack_trace+0xaf/0x190 [ 34.955630] ? check_preemption_disabled+0x41/0x280 [ 34.960625] ? trace_hardirqs_off+0x64/0x200 [ 34.965013] ? __kasan_slab_free+0x186/0x1f0 [ 34.969399] ? kmem_cache_free+0x7f/0x260 [ 34.973527] ? putname+0xe1/0x120 [ 34.976957] ? do_sys_open+0x2ba/0x520 [ 34.980819] ? do_syscall_64+0xf9/0x620 [ 34.984769] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.990111] ? mark_held_locks+0xf0/0xf0 [ 34.994147] ? __lock_acquire+0x6de/0x3ff0 [ 34.998357] ? debug_check_no_obj_freed+0x201/0x490 [ 35.003353] ? lock_downgrade+0x720/0x720 [ 35.007477] ? lock_acquire+0x170/0x3c0 [ 35.011426] ? debug_check_no_obj_freed+0xb5/0x490 [ 35.016334] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 35.022022] do_vfs_ioctl+0xcdb/0x12e0 [ 35.025890] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 35.030971] ? debug_check_no_obj_freed+0x201/0x490 [ 35.035968] ? ioctl_preallocate+0x200/0x200 [ 35.040352] ? putname+0xe1/0x120 [ 35.043783] ? putname+0xe1/0x120 [ 35.047212] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 35.052205] ? kmem_cache_free+0x226/0x260 [ 35.056416] ? putname+0xe1/0x120 [ 35.059846] ? do_sys_open+0x2bf/0x520 [ 35.063709] ? filp_open+0x70/0x70 [ 35.067224] ksys_ioctl+0x9b/0xc0 [ 35.070654] __x64_sys_ioctl+0x6f/0xb0 [ 35.074519] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.079078] do_syscall_64+0xf9/0x620 [ 35.082862] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.088032] RIP: 0033:0x7f606a4fd7f9 [ 35.091726] 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 7