syzbot


KCSAN: data-race in filemap_fault / generic_write_end

Status: auto-closed as invalid on 2020/04/17 11:16
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+e8ea2b4f41c3ec129aaf@syzkaller.appspotmail.com
First crash: 1732d, last: 1732d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in filemap_fault / generic_write_end (3) ext4 2 1502d 1503d 0/28 auto-closed as invalid on 2020/10/24 13:06
upstream KCSAN: data-race in filemap_fault / generic_write_end (8) ext4 2 646d 649d 0/28 auto-obsoleted due to no activity on 2023/03/17 09:30
upstream KCSAN: data-race in filemap_fault / generic_write_end (10) exfat 2 361d 324d 0/28 auto-obsoleted due to no activity on 2023/12/25 00:01
upstream KCSAN: data-race in filemap_fault / generic_write_end (9) ext4 3 541d 543d 0/28 auto-obsoleted due to no activity on 2023/06/12 19:56
upstream KCSAN: data-race in filemap_fault / generic_write_end (4) ext4 3 1245d 1328d 0/28 auto-closed as invalid on 2021/07/08 19:40
upstream KCSAN: data-race in filemap_fault / generic_write_end (6) ext4 43 890d 995d 0/28 auto-closed as invalid on 2022/06/28 10:53
upstream KCSAN: data-race in filemap_fault / generic_write_end (7) ext4 1 760d 760d 0/28 auto-obsoleted due to no activity on 2022/11/05 12:50
upstream KCSAN: data-race in filemap_fault / generic_write_end (2) ext4 1 1561d 1561d 0/28 auto-closed as invalid on 2020/08/26 18:57
upstream KCSAN: data-race in filemap_fault / generic_write_end (5) ext4 3 1168d 1203d 0/28 auto-closed as invalid on 2021/09/23 14:23

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

read to 0xffff888128d073b8 of 8 bytes by task 18284 on cpu 1:
 filemap_fault+0x62d/0x10a0 mm/filemap.c:2552
 ext4_filemap_fault+0x59/0x72 fs/ext4/inode.c:5977
 __do_fault+0xae/0x1f0 mm/memory.c:3188
 do_cow_fault mm/memory.c:3614 [inline]
 do_fault mm/memory.c:3716 [inline]
 handle_pte_fault mm/memory.c:3945 [inline]
 __handle_mm_fault+0xe63/0x2e00 mm/memory.c:4075
 handle_mm_fault+0x21b/0x530 mm/memory.c:4112
 faultin_page mm/gup.c:640 [inline]
 __get_user_pages+0x485/0x1130 mm/gup.c:851
 populate_vma_page_range+0xe6/0x100 mm/gup.c:1235
 __mm_populate+0x168/0x2a0 mm/gup.c:1283
 mm_populate include/linux/mm.h:2347 [inline]
 vm_mmap_pgoff+0x181/0x190 mm/util.c:511
 ksys_mmap_pgoff+0x2d8/0x420 mm/mmap.c:1607
 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline]
 __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline]
 __x64_sys_mmap+0x2e/0x40 arch/x86/kernel/sys_x86_64.c:91
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff888128d073b8 of 8 bytes by task 18277 on cpu 0:
 i_size_write include/linux/fs.h:888 [inline]
 generic_write_end+0xd0/0x1f0 fs/buffer.c:2183
 ext4_da_write_end+0x158/0x620 fs/ext4/inode.c:3091
 generic_perform_write+0x1d3/0x320 mm/filemap.c:3320
 ext4_buffered_write_iter+0x143/0x290 fs/ext4/file.c:252
 ext4_file_write_iter+0xf4/0xd40 fs/ext4/file.c:547
 call_write_iter include/linux/fs.h:1902 [inline]
 new_sync_write+0x388/0x4a0 fs/read_write.c:483
 __vfs_write+0xb1/0xc0 fs/read_write.c:496
 vfs_write fs/read_write.c:558 [inline]
 vfs_write+0x18a/0x390 fs/read_write.c:542
 ksys_write+0xd5/0x1b0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x4c/0x60 fs/read_write.c:620
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 18277 Comm: syz-executor.1 Not tainted 5.5.0-rc1-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
2020/02/01 22:58 https://github.com/google/ktsan.git kcsan 245a43005292 2274ad39 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.