syzbot


KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space

Status: closed as invalid on 2019/11/19 14:44
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1066d, last: 1049d
similar bugs (6):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (4) 10 722d 823d 0/24 auto-closed as invalid on 2020/11/07 06:53
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (3) 2 845d 865d 0/24 closed as invalid on 2020/06/18 14:24
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (6) 23 440d 584d 0/24 auto-closed as invalid on 2021/08/16 16:28
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (7) 16 289d 397d 0/24 auto-closed as invalid on 2022/01/14 22:09
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (5) 1 621d 621d 0/24 auto-closed as invalid on 2021/02/16 17:07
upstream KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (2) 7 955d 1020d 0/24 auto-closed as invalid on 2020/04/23 17:25

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space

write to 0xffff888125e0e560 of 4 bytes by task 13970 on cpu 0:
 ext4_da_reserve_space+0x13f/0x280 fs/ext4/inode.c:1617
 ext4_insert_delayed_block fs/ext4/inode.c:1780 [inline]
 ext4_da_map_blocks fs/ext4/inode.c:1895 [inline]
 ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1959
 ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1202
 ext4_da_write_begin+0x1da/0x7e0 fs/ext4/inode.c:3094
 generic_perform_write+0x136/0x320 mm/filemap.c:3305
 __generic_file_write_iter+0x251/0x380 mm/filemap.c:3434
 ext4_file_write_iter+0x1bd/0xa00 fs/ext4/file.c:268
 call_write_iter include/linux/fs.h:1895 [inline]
 aio_write+0x1de/0x2d0 fs/aio.c:1583
 __io_submit_one fs/aio.c:1815 [inline]
 io_submit_one+0x639/0xe70 fs/aio.c:1862
 __do_sys_io_submit fs/aio.c:1921 [inline]
 __se_sys_io_submit fs/aio.c:1891 [inline]
 __x64_sys_io_submit+0x104/0x2d0 fs/aio.c:1891
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888125e0e560 of 4 bytes by task 13960 on cpu 1:
 ext4_alloc_da_blocks+0x4b/0x180 fs/ext4/inode.c:3209
 ext4_release_file+0x10d/0x200 fs/ext4/file.c:88
 __fput+0x1e1/0x520 fs/file_table.c:280
 ____fput+0x1f/0x30 fs/file_table.c:313
 task_work_run+0xf6/0x130 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:163
 prepare_exit_to_usermode arch/x86/entry/common.c:194 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:274 [inline]
 do_syscall_64+0x353/0x370 arch/x86/entry/common.c:300
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2019/11/11 07:12 https://github.com/google/ktsan.git kcsan 94c006602e13 dc438b91 .config log report
ci2-upstream-kcsan-gce 2019/10/25 11:24 https://github.com/google/ktsan.git kcsan 05f2236801fe d01bb02a .config log report
* Struck through repros no longer work on HEAD.