XFS (loop1): Quotacheck needed: Please wait. XFS (loop1): Quotacheck: Done. syz-executor.1 (11261) used greatest stack depth: 24072 bytes left XFS (loop1): Unmounting Filesystem ====================================================== WARNING: possible circular locking dependency detected 4.14.302-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:5/3580 is trying to acquire lock: (sb_internal#2){.+.+}, at: [] sb_start_intwrite include/linux/fs.h:1598 [inline] (sb_internal#2){.+.+}, at: [] start_transaction+0x6de/0xf30 fs/btrfs/transaction.c:548 but task is already holding lock: ((&work->normal_work)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 ((&work->normal_work)){+.+.}: process_one_work+0x736/0x14a0 kernel/workqueue.c:2093 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #3 ("%s-%s""btrfs", name){+.+.}: flush_workqueue+0xfa/0x1310 kernel/workqueue.c:2625 drain_workqueue+0x177/0x3e0 kernel/workqueue.c:2790 destroy_workqueue+0x71/0x710 kernel/workqueue.c:4116 __btrfs_destroy_workqueue fs/btrfs/async-thread.c:436 [inline] btrfs_destroy_workqueue+0xf8/0x630 fs/btrfs/async-thread.c:447 scrub_workers_put+0x90/0x1a0 fs/btrfs/scrub.c:4075 btrfs_scrub_dev+0x536/0xcd0 fs/btrfs/scrub.c:4219 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #2 (&fs_info->scrub_lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 btrfs_scrub_dev+0x1f3/0xcd0 fs/btrfs/scrub.c:4150 btrfs_ioctl_scrub fs/btrfs/ioctl.c:4451 [inline] btrfs_ioctl+0xba8/0x5b20 fs/btrfs/ioctl.c:5681 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #1 (&fs_devs->device_list_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 btrfs_finish_chunk_alloc+0x221/0xe90 fs/btrfs/volumes.c:4923 btrfs_create_pending_block_groups+0x1fd/0x540 fs/btrfs/extent-tree.c:10388 __btrfs_end_transaction+0x1f2/0xaa0 fs/btrfs/transaction.c:851 flush_space+0x8de/0xde0 fs/btrfs/extent-tree.c:5046 btrfs_async_reclaim_metadata_space+0x414/0xc20 fs/btrfs/extent-tree.c:5162 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 -> #0 (sb_internal#2){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_intwrite include/linux/fs.h:1598 [inline] start_transaction+0x6de/0xf30 fs/btrfs/transaction.c:548 btrfs_qgroup_rescan_worker+0x176/0x1060 fs/btrfs/qgroup.c:2632 normal_work_helper+0x304/0x1330 fs/btrfs/async-thread.c:376 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 other info that might help us debug this: Chain exists of: sb_internal#2 --> "%s-%s""btrfs", name --> (&work->normal_work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((&work->normal_work)); lock("%s-%s""btrfs", name); lock((&work->normal_work)); lock(sb_internal#2); *** DEADLOCK *** 2 locks held by kworker/u4:5/3580: #0: ("%s-%s""btrfs", name){+.+.}, at: [] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2088 #1: ((&work->normal_work)){+.+.}, at: [] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092 stack backtrace: CPU: 0 PID: 3580 Comm: kworker/u4:5 Not tainted 4.14.302-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: btrfs-qgroup-rescan btrfs_qgroup_rescan_helper Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_intwrite include/linux/fs.h:1598 [inline] start_transaction+0x6de/0xf30 fs/btrfs/transaction.c:548 btrfs_qgroup_rescan_worker+0x176/0x1060 fs/btrfs/qgroup.c:2632 normal_work_helper+0x304/0x1330 fs/btrfs/async-thread.c:376 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251 kthread+0x30d/0x420 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:406 netlink: 40 bytes leftover after parsing attributes in process `syz-executor.5'. BTRFS error (device loop2): fail to start transaction for status update: -28 XFS (loop5): Mounting V4 Filesystem XFS (loop5): Ending clean mount audit: type=1800 audit(1672209150.851:28): pid=11379 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=41 res=0 XFS (loop1): mounting with "discard" option, but the device does not support discard XFS (loop1): Mounting V4 Filesystem XFS (loop1): Ending clean mount XFS (loop1): Quotacheck needed: Please wait. XFS (loop1): Quotacheck: Done. syz-executor.5 (11379) used greatest stack depth: 22880 bytes left XFS (loop5): Unmounting Filesystem XFS (loop1): Unmounting Filesystem BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents XFS (loop1): mounting with "discard" option, but the device does not support discard XFS (loop1): Mounting V4 Filesystem XFS (loop1): Ending clean mount XFS (loop1): Quotacheck needed: Please wait. XFS (loop1): Quotacheck: Done. XFS (loop5): Mounting V4 Filesystem BTRFS error (device loop2): fail to start transaction for status update: -28 XFS (loop5): Ending clean mount XFS (loop1): Unmounting Filesystem audit: type=1800 audit(1672209151.751:29): pid=11463 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=41 res=0 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents XFS (loop5): Unmounting Filesystem BTRFS error (device loop4): fail to start transaction for status update: -28 XFS (loop1): mounting with "discard" option, but the device does not support discard XFS (loop1): Mounting V4 Filesystem XFS (loop1): Ending clean mount XFS (loop1): Quotacheck needed: Please wait. XFS (loop1): Quotacheck: Done. XFS (loop1): Unmounting Filesystem XFS (loop5): Mounting V4 Filesystem XFS (loop5): Ending clean mount audit: type=1800 audit(1672209152.601:30): pid=11606 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=41 res=0 XFS (loop5): Unmounting Filesystem XFS (loop5): Mounting V4 Filesystem XFS (loop5): Ending clean mount audit: type=1800 audit(1672209153.051:31): pid=11707 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="loop5" ino=41 res=0 XFS (loop5): Unmounting Filesystem caif:caif_disconnect_client(): nothing to disconnect TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. Zero length message leads to an empty skb TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. capability: warning: `syz-executor.5' uses 32-bit capabilities (legacy support in use) hrtimer: interrupt took 23762 ns netlink: 44 bytes leftover after parsing attributes in process `syz-executor.0'. BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents audit: type=1800 audit(1672209155.921:32): pid=11989 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="file0" dev="loop2" ino=258 res=0 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents audit: type=1800 audit(1672209156.461:33): pid=12095 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="loop4" ino=258 res=0 audit: type=1800 audit(1672209156.541:34): pid=12138 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="file0" dev="loop4" ino=258 res=0 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents audit: type=1800 audit(1672209156.851:35): pid=12213 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="loop4" ino=258 res=0 BTRFS info (device loop2): using free space tree BTRFS info (device loop2): has skinny extents audit: type=1800 audit(1672209157.011:36): pid=12247 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="file0" dev="loop2" ino=258 res=0 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents audit: type=1800 audit(1672209157.441:37): pid=12314 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.4" name="file0" dev="loop4" ino=258 res=0 audit: type=1800 audit(1672209157.541:38): pid=12352 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="file0" dev="loop4" ino=258 res=0 netlink: 12 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.3'. caif:caif_disconnect_client(): nothing to disconnect audit: type=1804 audit(1672209157.871:39): pid=12499 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.0" name="/root/syzkaller-testdir644059133/syzkaller.yCCV2c/132/bus/file2" dev="loop0" ino=19 res=1 device vxlan0 entered promiscuous mode audit: type=1800 audit(1672209158.121:40): pid=12515 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="file0" dev="sda1" ino=14293 res=0 audit: type=1804 audit(1672209158.131:41): pid=12515 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir3616771110/syzkaller.vyMVtf/104/bus" dev="sda1" ino=14294 res=1 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents device vxlan0 entered promiscuous mode BTRFS error (device loop4): fail to start transaction for status update: -28 batman_adv: batadv0: Interface deactivated: batadv_slave_1 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents BTRFS error (device loop4): fail to start transaction for status update: -28 BTRFS info (device loop4): using free space tree BTRFS info (device loop4): has skinny extents BTRFS error (device loop4): fail to start transaction for status update: -28 netlink: 32 bytes leftover after parsing attributes in process `syz-executor.2'.