syzbot


KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages (3)

Status: auto-closed as invalid on 2021/11/26 15:32
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 461d, last: 402d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages 3 543d 567d 0/24 auto-closed as invalid on 2021/07/08 08:36
upstream KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages (4) 6 342d 364d 0/24 auto-closed as invalid on 2022/01/24 21:33
upstream KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages (6) 5 202d 203d 0/24 closed as invalid on 2022/05/13 11:20
upstream KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages (2) 2 497d 501d 0/24 auto-closed as invalid on 2021/08/23 09:16
upstream KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages (5) 2 297d 299d 0/24 auto-closed as invalid on 2022/03/11 03:48

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

write to 0xffff888104b58a48 of 8 bytes by task 9510 on cpu 0:
 i_size_write include/linux/fs.h:916 [inline]
 ext4_dio_write_end_io+0xd3/0x100 fs/ext4/file.c:399
 iomap_dio_complete+0xb8/0x3c0 fs/iomap/direct-io.c:86
 iomap_dio_rw+0x4e/0x70 fs/iomap/direct-io.c:652
 ext4_dio_write_iter fs/ext4/file.c:568 [inline]
 ext4_file_write_iter+0xaa9/0x11f0 fs/ext4/file.c:678
 call_write_iter include/linux/fs.h:2163 [inline]
 do_iter_readv_writev+0x2de/0x380 fs/read_write.c:729
 do_iter_write+0x192/0x5c0 fs/read_write.c:855
 vfs_iter_write+0x4c/0x70 fs/read_write.c:896
 iter_file_splice_write+0x43a/0x790 fs/splice.c:689
 do_splice_from fs/splice.c:767 [inline]
 direct_splice_actor+0x80/0xa0 fs/splice.c:936
 splice_direct_to_actor+0x345/0x650 fs/splice.c:891
 do_splice_direct+0x106/0x190 fs/splice.c:979
 do_sendfile+0x63e/0xbb0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888104b58a48 of 8 bytes by task 9519 on cpu 1:
 i_size_read include/linux/fs.h:894 [inline]
 ext4_readpage_limit fs/ext4/readpage.c:221 [inline]
 ext4_mpage_readpages+0x358/0x1140 fs/ext4/readpage.c:265
 ext4_readahead+0x99/0xa0 fs/ext4/inode.c:3202
 read_pages+0xb6/0x540 mm/readahead.c:130
 page_cache_ra_unbounded+0x16a/0x430 mm/readahead.c:211
 ondemand_readahead+0x58c/0x7c0
 page_cache_sync_ra+0xaf/0xe0 mm/readahead.c:580
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3ad/0x1220 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 ext4_file_read_iter+0x1db/0x290
 call_read_iter include/linux/fs.h:2157 [inline]
 generic_file_splice_read+0x24f/0x330 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+0x106/0x190 fs/splice.c:979
 do_sendfile+0x63e/0xbb0 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1314 [inline]
 __se_sys_sendfile64 fs/read_write.c:1300 [inline]
 __x64_sys_sendfile64+0x102/0x140 fs/read_write.c:1300
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000004a1000 -> 0x00000000004b0000

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

Crashes (13):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/22 15:27 upstream 64222515138e 282f03fb .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/14 01:45 upstream 348949d9a444 5462d470 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/09 11:05 upstream 5d6ab0bb408f 838e7e2c .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/08 11:22 upstream 1da38549dd64 efe0f24d .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/03 21:11 upstream 6761a0ae9895 db0f5787 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/03 18:31 upstream 7b66f4393ad4 db0f5787 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/10/02 19:54 upstream ab2a7a35c4e7 db0f5787 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/09/24 02:50 upstream f10f0481a5b5 8cac236e .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/09/18 21:34 upstream 93ff9f13be91 70b76c1d .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/09/17 10:06 upstream bdb575f87217 5b989942 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/09/13 17:13 upstream 6880fa6c5660 58d09404 .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/08/25 09:34 upstream 6e764bcd1cf7 b599f2fc .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
ci2-upstream-kcsan-gce 2021/08/24 08:17 upstream d5ae8d7f85b7 b599f2fc .config log report info KCSAN: data-race in ext4_dio_write_end_io / ext4_mpage_readpages
* Struck through repros no longer work on HEAD.