syzbot


KCSAN: data-race in ext4_alloc_da_blocks / ext4_da_reserve_space (2)

Status: auto-closed as invalid on 2020/04/23 17:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1020d, last: 955d
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 2 1049d 1066d 0/24 closed as invalid on 2019/11/19 14:44
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

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

write to 0xffff8881257cf9b0 of 4 bytes by task 29585 on cpu 1:
 ext4_da_reserve_space+0x13f/0x280 fs/ext4/inode.c:1470
 ext4_insert_delayed_block fs/ext4/inode.c:1633 [inline]
 ext4_da_map_blocks fs/ext4/inode.c:1748 [inline]
 ext4_da_get_block_prep+0x87f/0xa60 fs/ext4/inode.c:1812
 ext4_block_write_begin+0x33e/0xba0 fs/ext4/inode.c:1055
 ext4_da_write_begin+0x208/0x840 fs/ext4/inode.c:2996
 generic_perform_write+0x136/0x320 mm/filemap.c:3309
 ext4_buffered_write_iter+0x143/0x290 fs/ext4/file.c:252
 ext4_file_write_iter+0xf4/0xd40 fs/ext4/file.c:547
 call_write_iter include/linux/fs.h:1902 [inline]
 do_iter_readv_writev+0x487/0x5b0 fs/read_write.c:693
 do_iter_write fs/read_write.c:970 [inline]
 do_iter_write+0x13b/0x3c0 fs/read_write.c:951
 vfs_iter_write+0x5c/0x80 fs/read_write.c:983
 iter_file_splice_write+0x530/0x840 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0xa0/0xc0 fs/splice.c:1037
 splice_direct_to_actor+0x22b/0x540 fs/splice.c:992
 do_splice_direct+0x161/0x1e0 fs/splice.c:1080
 do_sendfile+0x384/0x7f0 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x12a/0x140 fs/read_write.c:1511
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8881257cf9b0 of 4 bytes by task 29584 on cpu 0:
 ext4_alloc_da_blocks+0x4b/0x180 fs/ext4/inode.c:3111
 ext4_release_file+0x10d/0x210 fs/ext4/file.c:141
 __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:164
 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
 do_syscall_64+0x384/0x3a0 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

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

Crashes (7):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/02/13 17:18 https://github.com/google/ktsan.git kcsan 55121bc1808a e6247653 .config log report
ci2-upstream-kcsan-gce 2020/02/03 14:11 https://github.com/google/ktsan.git kcsan 245a43005292 93e5e335 .config log report
ci2-upstream-kcsan-gce 2020/01/24 19:16 https://github.com/google/ktsan.git kcsan 245a43005292 2e95ab33 .config log report
ci2-upstream-kcsan-gce 2019/12/29 05:59 https://github.com/google/ktsan.git kcsan 245a43005292 af6b8ef8 .config log report
ci2-upstream-kcsan-gce 2019/12/21 07:11 https://github.com/google/ktsan.git kcsan 245a43005292 bc586918 .config log report
ci2-upstream-kcsan-gce 2019/12/17 21:40 https://github.com/google/ktsan.git kcsan 245a43005292 1af3875f .config log report
ci2-upstream-kcsan-gce 2019/12/10 15:33 https://github.com/google/ktsan.git kcsan ef798c30ba4e 4b83c8fb .config log report
* Struck through repros no longer work on HEAD.