syzbot


KCSAN: data-race in ext4_setattr / ext4_writepages (5)

Status: auto-closed as invalid on 2021/09/20 22:44
Subsystems: ext4
[Documentation on labels]
First crash: 991d, last: 991d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (3) ext4 1 1189d 1189d 0/26 auto-closed as invalid on 2021/03/06 22:57
upstream KCSAN: data-race in ext4_setattr / ext4_writepages ext4 1 1520d 1520d 0/26 auto-closed as invalid on 2020/05/14 14:36
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (6) ext4 4 905d 932d 0/26 auto-closed as invalid on 2021/12/15 15:54
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (2) ext4 1 1248d 1244d 0/26 auto-closed as invalid on 2021/01/07 02:14
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (4) ext4 5 1061d 1141d 0/26 auto-closed as invalid on 2021/07/12 17:41

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

write to 0xffff888138c7b210 of 8 bytes by task 27878 on cpu 1:
 i_size_write include/linux/fs.h:871 [inline]
 ext4_setattr+0xd54/0xec0 fs/ext4/inode.c:5481
 notify_change+0x8a3/0xa80 fs/attr.c:398
 do_truncate+0xe8/0x130 fs/open.c:64
 handle_truncate fs/namei.c:3030 [inline]
 do_open fs/namei.c:3378 [inline]
 path_openat+0x19b2/0x1f20 fs/namei.c:3507
 do_filp_open+0xe9/0x200 fs/namei.c:3534
 do_sys_openat2+0xa3/0x250 fs/open.c:1204
 do_sys_open fs/open.c:1220 [inline]
 __do_sys_creat fs/open.c:1294 [inline]
 __se_sys_creat fs/open.c:1288 [inline]
 __x64_sys_creat+0x62/0x80 fs/open.c:1288
 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 0xffff888138c7b210 of 8 bytes by task 27863 on cpu 0:
 i_size_read include/linux/fs.h:849 [inline]
 mpage_submit_page fs/ext4/inode.c:2094 [inline]
 mpage_map_and_submit_buffers fs/ext4/inode.c:2348 [inline]
 mpage_map_and_submit_extent fs/ext4/inode.c:2487 [inline]
 ext4_writepages+0x1008/0x1d10 fs/ext4/inode.c:2800
 do_writepages+0x7b/0x150 mm/page-writeback.c:2355
 __filemap_fdatawrite_range mm/filemap.c:413 [inline]
 __filemap_fdatawrite mm/filemap.c:421 [inline]
 filemap_flush+0x132/0x160 mm/filemap.c:448
 ext4_alloc_da_blocks+0x47/0xd0 fs/ext4/inode.c:3164
 ext4_release_file+0x5b/0x1d0 fs/ext4/file.c:141
 __fput+0x25b/0x4e0 fs/file_table.c:280
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0xae/0x130 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x49/0x90 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000fff000 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 27863 Comm: syz-executor.0 Not tainted 5.14.0-rc6-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
2021/08/16 22:35 upstream 7c60610d4767 6652437d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in ext4_setattr / ext4_writepages
* Struck through repros no longer work on HEAD.