================================================================== BUG: KCSAN: data-race in caching_thread / find_free_extent write to 0xffff88813b8f48a4 of 4 bytes by task 24 on cpu 0: caching_thread+0x799/0x8d0 fs/btrfs/block-group.c:691 btrfs_work_helper+0x1e2/0x380 fs/btrfs/async-thread.c:318 process_one_work+0x3e1/0x950 kernel/workqueue.c:2275 worker_thread+0x616/0xa70 kernel/workqueue.c:2421 kthread+0x20b/0x230 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 read to 0xffff88813b8f48a4 of 4 bytes by task 19974 on cpu 1: find_free_extent+0xee1/0x1a30 fs/btrfs/extent-tree.c:4158 btrfs_reserve_extent+0x118/0x2c0 fs/btrfs/extent-tree.c:4292 btrfs_alloc_tree_block+0xfe/0x880 fs/btrfs/extent-tree.c:4693 alloc_tree_block_no_bg_flush fs/btrfs/ctree.c:989 [inline] __btrfs_cow_block+0x2f2/0xac0 fs/btrfs/ctree.c:1045 btrfs_cow_block+0x252/0x3a0 fs/btrfs/ctree.c:1490 btrfs_search_slot+0x749/0x1320 fs/btrfs/ctree.c:2666 lookup_inline_extent_backref+0x1cd/0xf80 fs/btrfs/extent-tree.c:862 lookup_extent_backref fs/btrfs/extent-tree.c:1078 [inline] __btrfs_free_extent+0x13f/0x16d0 fs/btrfs/extent-tree.c:2994 run_delayed_tree_ref+0x1ae/0x2e0 fs/btrfs/extent-tree.c:1689 run_one_delayed_ref fs/btrfs/extent-tree.c:1713 [inline] btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1973 [inline] __btrfs_run_delayed_refs+0x5e1/0xab0 fs/btrfs/extent-tree.c:2038 btrfs_run_delayed_refs+0xcf/0x320 fs/btrfs/extent-tree.c:2169 commit_cowonly_roots+0xec/0x5e0 fs/btrfs/transaction.c:1233 btrfs_commit_transaction+0x95e/0x1870 fs/btrfs/transaction.c:2275 btrfs_commit_super+0x8f/0xa0 fs/btrfs/disk-io.c:4077 close_ctree+0x1af/0x4ad fs/btrfs/disk-io.c:4141 btrfs_put_super+0x21/0x30 fs/btrfs/super.c:326 generic_shutdown_super+0xde/0x210 fs/super.c:464 kill_anon_super+0x23/0x40 fs/super.c:1055 btrfs_kill_super+0x26/0x40 fs/btrfs/super.c:2347 deactivate_locked_super+0x6a/0xb0 fs/super.c:335 deactivate_super+0x85/0x90 fs/super.c:366 cleanup_mnt+0x277/0x2e0 fs/namespace.c:1118 __cleanup_mnt+0x15/0x20 fs/namespace.c:1125 task_work_run+0x8e/0x110 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x17c/0x1b0 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:294 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x44/0xae Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19974 Comm: syz-executor.0 Not tainted 5.11.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ==================================================================