syzbot


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

Status: auto-closed as invalid on 2021/07/12 17:41
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 517d, last: 437d
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) 1 565d 565d 0/23 auto-closed as invalid on 2021/03/06 22:57
upstream KCSAN: data-race in ext4_setattr / ext4_writepages 1 897d 897d 0/23 auto-closed as invalid on 2020/05/14 14:36
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (5) 1 367d 367d 0/23 auto-closed as invalid on 2021/09/20 22:44
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (6) 4 282d 309d 0/23 auto-closed as invalid on 2021/12/15 15:54
upstream KCSAN: data-race in ext4_setattr / ext4_writepages (2) 1 624d 620d 0/23 auto-closed as invalid on 2021/01/07 02:14

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

write to 0xffff888130333210 of 8 bytes by task 21802 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:3017 [inline]
 do_open fs/namei.c:3365 [inline]
 path_openat+0x1a79/0x20b0 fs/namei.c:3494
 do_filp_open+0xd9/0x1f0 fs/namei.c:3521
 do_sys_openat2+0xa3/0x250 fs/open.c:1187
 do_sys_open fs/open.c:1203 [inline]
 __do_sys_openat fs/open.c:1219 [inline]
 __se_sys_openat fs/open.c:1214 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1214
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888130333210 of 8 bytes by task 21793 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:2352
 __filemap_fdatawrite_range mm/filemap.c:413 [inline]
 file_write_and_wait_range+0x180/0x210 mm/filemap.c:792
 ext4_sync_file+0x105/0x670 fs/ext4/fsync.c:151
 vfs_fsync_range+0x107/0x120 fs/sync.c:200
 generic_write_sync include/linux/fs.h:2982 [inline]
 ext4_buffered_write_iter+0x39c/0x3f0 fs/ext4/file.c:277
 ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2114 [inline]
 new_sync_write fs/read_write.c:518 [inline]
 vfs_write+0x69d/0x770 fs/read_write.c:605
 ksys_write+0xce/0x180 fs/read_write.c:658
 __do_sys_write fs/read_write.c:670 [inline]
 __se_sys_write fs/read_write.c:667 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:667
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000324000 -> 0x0000000000000000

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

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/06/07 17:33 upstream 614124bea77e e59537be .config log report info KCSAN: data-race in ext4_setattr / ext4_writepages
ci2-upstream-kcsan-gce 2021/06/03 14:06 upstream 324c92e5e0ee 0740de69 .config log report info KCSAN: data-race in ext4_setattr / ext4_writepages
ci2-upstream-kcsan-gce 2021/05/06 15:13 upstream 8404c9fbc84b 06585184 .config log report info KCSAN: data-race in ext4_setattr / ext4_writepages
ci2-upstream-kcsan-gce 2021/04/17 23:35 upstream 194cf4825638 7e2b734b .config log report info KCSAN: data-race in ext4_setattr / ext4_writepages
ci2-upstream-kcsan-gce 2021/03/20 10:42 upstream 1c273e10bc0c e45f5621 .config log report info KCSAN: data-race in ext4_setattr / ext4_writepages