KCSAN: data-race in mb_mark_used / mb_update_avg_fragment_size

12 views
Skip to first unread message

syzbot

unread,
Aug 26, 2021, 5:46:18 AM8/26/21
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 73f3af7b4611 Merge branch 'akpm' (patches from Andrew)
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=143ba985300000
kernel config: https://syzkaller.appspot.com/x/.config?x=f4e6864080265900
dashboard link: https://syzkaller.appspot.com/bug?extid=9d22654a68f65eb0001e
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.1
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

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+9d2265...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in mb_mark_used / mb_update_avg_fragment_size

write to 0xffff88810177bb58 of 4 bytes by task 1778 on cpu 0:
mb_mark_used+0x2f2/0xc50 fs/ext4/mballoc.c:1955
ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2015
ext4_mb_measure_extent fs/ext4/mballoc.c:2131 [inline]
ext4_mb_complex_scan_group+0x349/0x850 fs/ext4/mballoc.c:2361
ext4_mb_regular_allocator+0x1a22/0x2520 fs/ext4/mballoc.c:2760
ext4_mb_new_blocks+0x762/0x1f90 fs/ext4/mballoc.c:5515
ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4245
ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638
ext4_getblk+0xb1/0x3d0 fs/ext4/inode.c:848
ext4_bread+0x28/0x100 fs/ext4/inode.c:900
ext4_append+0xd1/0x1c0 fs/ext4/namei.c:67
ext4_init_new_dir+0x177/0x500 fs/ext4/namei.c:2885
ext4_mkdir+0x329/0x760 fs/ext4/namei.c:2931
vfs_mkdir+0x2a4/0x370 fs/namei.c:3823
do_mkdirat+0x11d/0x200 fs/namei.c:3848
__do_sys_mkdir fs/namei.c:3866 [inline]
__se_sys_mkdir fs/namei.c:3864 [inline]
__x64_sys_mkdir+0x32/0x40 fs/namei.c:3864
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88810177bb58 of 4 bytes by task 29724 on cpu 1:
ext4_mb_avg_fragment_size_cmp fs/ext4/mballoc.c:834 [inline]
ext4_mb_rb_insert fs/ext4/mballoc.c:811 [inline]
mb_update_avg_fragment_size+0x161/0x260 fs/ext4/mballoc.c:859
mb_mark_used+0xae0/0xc50 fs/ext4/mballoc.c:1994
ext4_mb_use_best_found+0x102/0x320 fs/ext4/mballoc.c:2015
ext4_mb_find_by_goal+0x5c3/0x890 fs/ext4/mballoc.c:2227
ext4_mb_regular_allocator+0x11c/0x2520 fs/ext4/mballoc.c:2636
ext4_mb_new_blocks+0x762/0x1f90 fs/ext4/mballoc.c:5515
ext4_ext_map_blocks+0x1569/0x1f00 fs/ext4/extents.c:4245
ext4_map_blocks+0x70d/0xef0 fs/ext4/inode.c:638
ext4_alloc_file_blocks+0x271/0x720 fs/ext4/extents.c:4432
ext4_fallocate+0x2a7/0x4d0 fs/ext4/extents.c:4712
vfs_fallocate+0x463/0x660 fs/open.c:311
file_ioctl fs/ioctl.c:497 [inline]
do_vfs_ioctl+0x1322/0x1410 fs/ioctl.c:1048
__do_sys_ioctl fs/ioctl.c:1067 [inline]
__se_sys_ioctl+0x83/0x140 fs/ioctl.c:1055
__x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:1055
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000002 -> 0x00000001

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 29724 Comm: syz-executor.4 Not tainted 5.14.0-rc7-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,
Nov 19, 2021, 4:55:21 AM11/19/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