KCSAN: data-race in __btrfs_add_free_space / btrfs_wait_block_group_cache_progress

4 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 6:37:13 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7059c2c0 Merge branch 'for-linus' of git://git.kernel.org/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11085545500000
kernel config: https://syzkaller.appspot.com/x/.config?x=c949fed53798f819
dashboard link: https://syzkaller.appspot.com/bug?extid=8dc6eb2b2878291b2ef3
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
CC: [c...@fb.com dst...@suse.com jo...@toxicpanda.com linux...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8dc6eb...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __btrfs_add_free_space / btrfs_wait_block_group_cache_progress

read-write to 0xffff888029c1f850 of 8 bytes by task 26 on cpu 0:
link_free_space fs/btrfs/free-space-cache.c:1670 [inline]
__btrfs_add_free_space+0x3b9/0xcc0 fs/btrfs/free-space-cache.c:2507
btrfs_add_free_space_async_trimmed+0x6c/0x80 fs/btrfs/free-space-cache.c:2554
add_new_free_space+0x189/0x1e0 fs/btrfs/block-group.c:485
load_extent_tree_free fs/btrfs/block-group.c:601 [inline]
caching_thread+0x37c/0x7c0 fs/btrfs/block-group.c:645
btrfs_work_helper+0x1e2/0x380 fs/btrfs/async-thread.c:318
process_one_work+0x3e1/0x950 kernel/workqueue.c:2272
worker_thread+0x635/0xb90 kernel/workqueue.c:2418
kthread+0x1fd/0x220 kernel/kthread.c:292
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

read to 0xffff888029c1f850 of 8 bytes by task 8466 on cpu 1:
btrfs_wait_block_group_cache_progress+0x185/0x2c0 fs/btrfs/block-group.c:405
find_free_extent_clustered+0x5b7/0x740 fs/btrfs/extent-tree.c:3715
do_allocation_clustered fs/btrfs/extent-tree.c:3801 [inline]
do_allocation fs/btrfs/extent-tree.c:3816 [inline]
find_free_extent+0xd67/0x1a30 fs/btrfs/extent-tree.c:4228
btrfs_reserve_extent+0x118/0x2c0 fs/btrfs/extent-tree.c:4358
btrfs_alloc_tree_block+0x101/0x7f0 fs/btrfs/extent-tree.c:4757
alloc_tree_block_no_bg_flush fs/btrfs/ctree.c:989 [inline]
__btrfs_cow_block+0x2ea/0xa40 fs/btrfs/ctree.c:1045
btrfs_cow_block+0x268/0x3b0 fs/btrfs/ctree.c:1497
commit_cowonly_roots+0x91/0x5d0 fs/btrfs/transaction.c:1186
btrfs_commit_transaction+0xaee/0x19b0 fs/btrfs/transaction.c:2283
btrfs_commit_super+0x8f/0xa0 fs/btrfs/disk-io.c:4023
close_ctree+0x1af/0x49b fs/btrfs/disk-io.c:4087
btrfs_put_super+0x21/0x30 fs/btrfs/super.c:321
generic_shutdown_super+0xcd/0x1f0 fs/super.c:464
kill_anon_super+0x23/0x40 fs/super.c:1108
btrfs_kill_super+0x26/0x40 fs/btrfs/super.c:2263
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:151
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
exit_to_user_mode_prepare+0x13c/0x170 kernel/entry/common.c:191
syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:266
do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8466 Comm: syz-executor.2 Not tainted 5.10.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Mar 28, 2021, 7:22:17 PM3/28/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages