syzbot


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

Status: auto-closed as invalid on 2021/09/15 01:54
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 516d, last: 476d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_mpage_readpages / ext4_setattr 3 1002d 1078d 0/24 auto-closed as invalid on 2020/05/12 04:51
upstream KCSAN: data-race in ext4_mpage_readpages / ext4_setattr (3) 8 553d 601d 0/24 auto-closed as invalid on 2021/06/30 12:56
upstream KCSAN: data-race in ext4_mpage_readpages / ext4_setattr (2) 15 660d 723d 0/24 auto-closed as invalid on 2021/03/15 11:12

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

write to 0xffff888143627bf0 of 8 bytes by task 8671 on cpu 0:
 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_openat fs/open.c:1236 [inline]
 __se_sys_openat fs/open.c:1231 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1231
 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 0xffff888143627bf0 of 8 bytes by task 8664 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 ext4_readpage_limit fs/ext4/readpage.c:221 [inline]
 ext4_mpage_readpages+0x34b/0x1130 fs/ext4/readpage.c:265
 ext4_readahead+0x99/0xa0 fs/ext4/inode.c:3260
 read_pages+0x9f/0x530 mm/readahead.c:130
 page_cache_ra_unbounded+0x3c8/0x410 mm/readahead.c:238
 ondemand_readahead+0x579/0x7b0 mm/readahead.c:267
 page_cache_sync_ra+0xaf/0xe0 mm/readahead.c:578
 page_cache_sync_readahead include/linux/pagemap.h:884 [inline]
 filemap_get_pages mm/filemap.c:2467 [inline]
 filemap_read+0x388/0x1220 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 ext4_file_read_iter+0x1db/0x290 fs/ext4/file.c:73
 call_read_iter include/linux/fs.h:2108 [inline]
 generic_file_splice_read+0x22a/0x310 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x2aa/0x650 fs/splice.c:870
 do_splice_direct+0xf5/0x170 fs/splice.c:979
 do_sendfile+0x773/0xda0 fs/read_write.c:1260
 __do_sys_sendfile64 fs/read_write.c:1325 [inline]
 __se_sys_sendfile64 fs/read_write.c:1311 [inline]
 __x64_sys_sendfile64+0xf2/0x130 fs/read_write.c:1311
 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

value changed: 0x0000000000e5c400 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8664 Comm: syz-executor.2 Tainted: G        W         5.14.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/08/11 01:46 upstream 9e723c5380c6 6972b106 .config log report info KCSAN: data-race in ext4_mpage_readpages / ext4_setattr
ci2-upstream-kcsan-gce 2021/08/04 15:19 upstream d5ad8ec3cfb5 6c236867 .config log report info KCSAN: data-race in ext4_mpage_readpages / ext4_setattr
ci2-upstream-kcsan-gce 2021/07/22 23:02 upstream 3d5895cd3517 241790bb .config log report info KCSAN: data-race in ext4_mpage_readpages / ext4_setattr
ci2-upstream-kcsan-gce 2021/07/06 11:53 upstream 3dbdb38e2869 6c4484eb .config log report info KCSAN: data-race in ext4_mpage_readpages / ext4_setattr
ci2-upstream-kcsan-gce 2021/07/02 18:46 upstream 3dbdb38e2869 55aa55c2 .config log report info KCSAN: data-race in ext4_mpage_readpages / ext4_setattr
* Struck through repros no longer work on HEAD.