syzbot


KCSAN: data-race in ext4_setattr / mpage_submit_page (2)

Status: auto-closed as invalid on 2020/02/16 17:06
Subsystems: ext4
[Documentation on labels]
First crash: 1599d, last: 1599d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_setattr / mpage_submit_page (3) ext4 4 1442d 1521d 0/26 auto-closed as invalid on 2020/06/18 14:03
upstream KCSAN: data-race in ext4_setattr / mpage_submit_page (4) ext4 1 1397d 1397d 0/26 auto-closed as invalid on 2020/08/02 08:15
upstream KCSAN: data-race in ext4_setattr / mpage_submit_page ext4 1 1636d 1636d 0/26 closed as invalid on 2019/11/19 13:24

Sample crash report:
==================================================================
BUG: KCSAN: data-race in ext4_setattr / mpage_submit_page

write to 0xffff888128878c78 of 8 bytes by task 23460 on cpu 0:
 i_size_write include/linux/fs.h:888 [inline]
 ext4_setattr+0xca8/0x15a0 fs/ext4/inode.c:5642
 notify_change+0x7e1/0xaa0 fs/attr.c:337
 do_truncate+0xfb/0x180 fs/open.c:64
 handle_truncate fs/namei.c:2998 [inline]
 do_last fs/namei.c:3414 [inline]
 path_openat+0x2f48/0x36e0 fs/namei.c:3525
 do_filp_open+0x11e/0x1b0 fs/namei.c:3555
 do_sys_open+0x3b3/0x4f0 fs/open.c:1097
 __do_sys_openat fs/open.c:1124 [inline]
 __se_sys_openat fs/open.c:1118 [inline]
 __x64_sys_openat+0x62/0x80 fs/open.c:1118
 do_syscall_64+0xcc/0x370 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888128878c78 of 8 bytes by task 23442 on cpu 1:
 mpage_submit_page+0x81/0x1a0 fs/ext4/inode.c:2216
 mpage_map_and_submit_buffers+0x331/0x520 fs/ext4/inode.c:2422
 mpage_map_and_submit_extent fs/ext4/inode.c:2556 [inline]
 ext4_writepages+0x1458/0x2300 fs/ext4/inode.c:2869
 do_writepages+0x6b/0x170 mm/page-writeback.c:2344
 __filemap_fdatawrite_range+0x1c5/0x230 mm/filemap.c:421
 __filemap_fdatawrite mm/filemap.c:429 [inline]
 filemap_flush+0x2d/0x40 mm/filemap.c:456
 ext4_alloc_da_blocks+0x78/0x180 fs/ext4/inode.c:3243
 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
 get_signal+0x12c3/0x1320 kernel/signal.c:2528
 do_signal+0x2f/0x6c0 arch/x86/kernel/signal.c:815
 exit_to_usermode_loop+0x250/0x2c0 arch/x86/entry/common.c:159
 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: 23442 Comm: syz-executor.1 Not tainted 5.4.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/12/08 17:04 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1508f453 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.