syzbot


KCSAN: data-race in generic_write_end / mpage_process_page_bufs (2)

Status: auto-closed as invalid on 2022/03/10 19:17
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 149d, last: 147d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_write_end / mpage_process_page_bufs (3) 169 1h00m 52d 0/22 moderation: reported on 2022/05/10 00:50
upstream KCSAN: data-race in generic_write_end / mpage_process_page_bufs 1952 191d 996d 0/22 auto-closed as invalid on 2022/01/25 08:32

Sample crash report:
==================================================================
BUG: KCSAN: data-race in generic_write_end / mpage_process_page_bufs

write to 0xffff88811c8deb88 of 8 bytes by task 25673 on cpu 1:
 i_size_write include/linux/fs.h:907 [inline]
 generic_write_end+0x96/0x180 fs/buffer.c:2187
 ext4_da_write_end+0x4de/0x630 fs/ext4/inode.c:3042
 generic_perform_write+0x261/0x400 mm/filemap.c:3776
 ext4_buffered_write_iter+0x244/0x360 fs/ext4/file.c:268
 ext4_file_write_iter+0x2e7/0x11f0
 call_write_iter include/linux/fs.h:2074 [inline]
 new_sync_write fs/read_write.c:503 [inline]
 vfs_write+0x7f5/0x950 fs/read_write.c:590
 ksys_write+0xd9/0x190 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x3e/0x50 fs/read_write.c:652
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff88811c8deb88 of 8 bytes by task 25678 on cpu 0:
 i_size_read include/linux/fs.h:885 [inline]
 mpage_process_page_bufs+0x34/0x560 fs/ext4/inode.c:2172
 mpage_prepare_extent_to_map+0x4f6/0x650 fs/ext4/inode.c:2604
 ext4_writepages+0xa78/0x1e80 fs/ext4/inode.c:2776
 do_writepages+0x1cb/0x330 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc mm/filemap.c:384 [inline]
 __filemap_fdatawrite_range mm/filemap.c:417 [inline]
 filemap_write_and_wait_range+0x1b4/0x340 mm/filemap.c:669
 filemap_write_and_wait include/linux/fs.h:2794 [inline]
 iomap_bmap+0x97/0x190 fs/iomap/fiemap.c:109
 ext4_bmap+0x213/0x230 fs/ext4/inode.c:3155
 bmap+0x5c/0x80 fs/inode.c:1795
 ioctl_fibmap fs/ioctl.c:77 [inline]
 file_ioctl fs/ioctl.c:331 [inline]
 do_vfs_ioctl+0x1330/0x14a0 fs/ioctl.c:853
 __do_sys_ioctl fs/ioctl.c:872 [inline]
 __se_sys_ioctl+0x83/0x140 fs/ioctl.c:860
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000006cb000 -> 0x00000000006cc000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 25678 Comm: syz-executor.2 Not tainted 5.17.0-rc2-syzkaller-00064-gc36c04c2e132 #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 2022/02/03 19:17 upstream c36c04c2e132 30646bfe .config log report info KCSAN: data-race in generic_write_end / mpage_process_page_bufs
ci2-upstream-kcsan-gce 2022/02/03 07:48 upstream 88808fbbead4 4ebb2798 .config log report info KCSAN: data-race in generic_write_end / mpage_process_page_bufs
ci2-upstream-kcsan-gce 2022/02/02 18:27 upstream 27bb0b18c208 4ebb2798 .config log report info KCSAN: data-race in generic_write_end / mpage_process_page_bufs
ci2-upstream-kcsan-gce 2022/02/01 22:33 upstream 9f7fb8de5d9b 4ebb2798 .config log report info KCSAN: data-race in generic_write_end / mpage_process_page_bufs
ci2-upstream-kcsan-gce 2022/02/01 21:10 upstream 9f7fb8de5d9b c1c1631d .config log report info KCSAN: data-race in generic_write_end / mpage_process_page_bufs