[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.10' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.277148] BTRFS: device fsid 24c7a497-3402-47dd-bef8-82358f5f30e0 devid 1 transid 8 /dev/loop0 [ 35.292039] BTRFS info (device loop0): using free space tree [ 35.298329] BTRFS info (device loop0): has skinny extents [ 35.358193] [ 35.359829] ====================================================== [ 35.366124] WARNING: possible circular locking dependency detected [ 35.372417] 4.19.211-syzkaller #0 Not tainted [ 35.376883] ------------------------------------------------------ [ 35.383172] syz-executor339/8117 is trying to acquire lock: [ 35.388860] 00000000184b7647 (&fs_info->qgroup_ioctl_lock){+.+.}, at: btrfs_limit_qgroup+0x63/0x7b0 [ 35.398139] [ 35.398139] but task is already holding lock: [ 35.404083] 00000000517da3a5 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 35.412034] [ 35.412034] which lock already depends on the new lock. [ 35.412034] [ 35.420321] [ 35.420321] the existing dependency chain (in reverse order) is: [ 35.427916] [ 35.427916] -> #1 (sb_internal#2){.+.+}: [ 35.433448] start_transaction+0xa37/0xf90 [ 35.438184] btrfs_quota_enable+0x169/0x10b0 [ 35.443092] btrfs_ioctl+0x622c/0x76d0 [ 35.447482] do_vfs_ioctl+0xcdb/0x12e0 [ 35.451880] ksys_ioctl+0x9b/0xc0 [ 35.455840] __x64_sys_ioctl+0x6f/0xb0 [ 35.460315] do_syscall_64+0xf9/0x620 [ 35.464614] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.470299] [ 35.470299] -> #0 (&fs_info->qgroup_ioctl_lock){+.+.}: [ 35.477046] __mutex_lock+0xd7/0x1190 [ 35.481351] btrfs_limit_qgroup+0x63/0x7b0 [ 35.486086] btrfs_ioctl+0x3c0c/0x76d0 [ 35.490470] do_vfs_ioctl+0xcdb/0x12e0 [ 35.494857] ksys_ioctl+0x9b/0xc0 [ 35.498812] __x64_sys_ioctl+0x6f/0xb0 [ 35.503205] do_syscall_64+0xf9/0x620 [ 35.507504] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.513184] [ 35.513184] other info that might help us debug this: [ 35.513184] [ 35.521306] Possible unsafe locking scenario: [ 35.521306] [ 35.527340] CPU0 CPU1 [ 35.531977] ---- ---- [ 35.536618] lock(sb_internal#2); [ 35.540133] lock(&fs_info->qgroup_ioctl_lock); [ 35.547378] lock(sb_internal#2); [ 35.553411] lock(&fs_info->qgroup_ioctl_lock); [ 35.558139] [ 35.558139] *** DEADLOCK *** [ 35.558139] [ 35.564175] 2 locks held by syz-executor339/8117: [ 35.568987] #0: 00000000e17d1abf (sb_writers#11){.+.+}, at: mnt_want_write_file+0x63/0x1d0 [ 35.577465] #1: 00000000517da3a5 (sb_internal#2){.+.+}, at: start_transaction+0xa37/0xf90 [ 35.585850] [ 35.585850] stack backtrace: [ 35.590330] CPU: 0 PID: 8117 Comm: syz-executor339 Not tainted 4.19.211-syzkaller #0 [ 35.598184] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 35.607510] Call Trace: [ 35.610078] dump_stack+0x1fc/0x2ef [ 35.613684] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.619474] __lock_acquire+0x30c9/0x3ff0 [ 35.623601] ? check_preemption_disabled+0x41/0x280 [ 35.628595] ? mark_held_locks+0xf0/0xf0 [ 35.632632] ? kfree+0xcc/0x210 [ 35.635890] ? start_transaction+0x35f/0xf90 [ 35.640296] ? btrfs_ioctl+0x3b3d/0x76d0 [ 35.644338] ? do_vfs_ioctl+0xcdb/0x12e0 [ 35.648377] ? ksys_ioctl+0x9b/0xc0 [ 35.651987] ? lock_acquire+0x170/0x3c0 [ 35.655939] ? btrfs_record_root_in_trans+0x122/0x190 [ 35.661104] lock_acquire+0x170/0x3c0 [ 35.664885] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.669271] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.673656] __mutex_lock+0xd7/0x1190 [ 35.677442] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.681827] ? mutex_trylock+0x1a0/0x1a0 [ 35.685865] ? btrfs_limit_qgroup+0x63/0x7b0 [ 35.690251] ? mutex_trylock+0x1a0/0x1a0 [ 35.694289] ? lock_downgrade+0x720/0x720 [ 35.698415] ? wait_for_completion_io+0x10/0x10 [ 35.703059] ? record_root_in_trans.isra.0+0x18c/0x400 [ 35.708317] ? btrfs_record_root_in_trans+0x13c/0x190 [ 35.713485] btrfs_limit_qgroup+0x63/0x7b0 [ 35.717700] btrfs_ioctl+0x3c0c/0x76d0 [ 35.721564] ? is_bpf_text_address+0xfc/0x1b0 [ 35.726036] ? kernel_text_address+0xbd/0xf0 [ 35.730422] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 35.736110] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.741450] ? __save_stack_trace+0xaf/0x190 [ 35.745840] ? check_preemption_disabled+0x41/0x280 [ 35.750835] ? trace_hardirqs_off+0x64/0x200 [ 35.755229] ? __kasan_slab_free+0x186/0x1f0 [ 35.759614] ? kmem_cache_free+0x7f/0x260 [ 35.763738] ? putname+0xe1/0x120 [ 35.767169] ? do_sys_open+0x2ba/0x520 [ 35.771034] ? do_syscall_64+0xf9/0x620 [ 35.774988] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.780333] ? mark_held_locks+0xf0/0xf0 [ 35.784375] ? __lock_acquire+0x6de/0x3ff0 [ 35.788589] ? debug_check_no_obj_freed+0x201/0x490 [ 35.793585] ? lock_downgrade+0x720/0x720 [ 35.797711] ? lock_acquire+0x170/0x3c0 [ 35.801664] ? debug_check_no_obj_freed+0xb5/0x490 [ 35.806571] ? btrfs_ioctl_get_supported_features+0x50/0x50 [ 35.812259] do_vfs_ioctl+0xcdb/0x12e0 [ 35.816146] ? _raw_spin_unlock_irqrestore+0x66/0xe0 [ 35.821229] ? debug_check_no_obj_freed+0x201/0x490 [ 35.826223] ? ioctl_preallocate+0x200/0x200 [ 35.830607] ? putname+0xe1/0x120 [ 35.834038] ? putname+0xe1/0x120 [ 35.837471] ? rcu_read_lock_sched_held+0x16c/0x1d0 [ 35.842465] ? kmem_cache_free+0x226/0x260 [ 35.846678] ? putname+0xe1/0x120 [ 35.850107] ? do_sys_open+0x2bf/0x520 [ 35.853970] ? filp_open+0x70/0x70 [ 35.857488] ksys_ioctl+0x9b/0xc0 [ 35.860920] __x64_sys_ioctl+0x6f/0xb0 [ 35.864787] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.869347] do_syscall_64+0xf9/0x620 [ 35.873129] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.878299] RIP: 0033:0x7f093b83a859 [ 35.881991] 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 [ 35.900868] RSP: 002b:00007ffc649ff9c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.908551] RAX: fff