syzbot


KCSAN: data-race in filemap_fault / generic_write_end (4)

Status: auto-closed as invalid on 2021/07/08 19:40
Subsystems: ext4
[Documentation on labels]
First crash: 1312d, last: 1229d
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 1486d 1487d 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 630d 633d 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 345d 309d 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 525d 527d 0/28 auto-obsoleted due to no activity on 2023/06/12 19:56
upstream KCSAN: data-race in filemap_fault / generic_write_end (6) ext4 43 874d 979d 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 744d 744d 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 1545d 1545d 0/28 auto-closed as invalid on 2020/08/26 18:57
upstream KCSAN: data-race in filemap_fault / generic_write_end ext4 1 1717d 1655d 0/28 auto-closed as invalid on 2020/04/17 11:16
upstream KCSAN: data-race in filemap_fault / generic_write_end (5) ext4 3 1152d 1187d 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

write to 0xffff888106675840 of 8 bytes by task 6955 on cpu 0:
 i_size_write include/linux/fs.h:871 [inline]
 generic_write_end+0x96/0x180 fs/buffer.c:2207
 ext4_da_write_end+0x59b/0x730 fs/ext4/inode.c:3110
 generic_perform_write+0x23e/0x3a0 mm/filemap.c:3671
 ext4_buffered_write_iter+0x2f2/0x3f0 fs/ext4/file.c:269
 ext4_file_write_iter+0x2e7/0x11d0 fs/ext4/file.c:519
 call_write_iter include/linux/fs.h:2114 [inline]
 do_iter_readv_writev+0x2cb/0x360 fs/read_write.c:740
 do_iter_write+0x112/0x4c0 fs/read_write.c:866
 vfs_iter_write+0x4c/0x70 fs/read_write.c:907
 iter_file_splice_write+0x40a/0x750 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+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_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106675840 of 8 bytes by task 6956 on cpu 1:
 i_size_read include/linux/fs.h:849 [inline]
 filemap_fault+0x88/0x7b0 mm/filemap.c:2971
 ext4_filemap_fault+0x4b/0x60 fs/ext4/inode.c:6194
 __do_fault mm/memory.c:3678 [inline]
 do_shared_fault mm/memory.c:4034 [inline]
 do_fault mm/memory.c:4112 [inline]
 handle_pte_fault mm/memory.c:4367 [inline]
 __handle_mm_fault mm/memory.c:4502 [inline]
 handle_mm_fault+0xf76/0x1a70 mm/memory.c:4600
 do_user_addr_fault+0x60c/0xc00 arch/x86/mm/fault.c:1390
 handle_page_fault arch/x86/mm/fault.c:1475 [inline]
 exc_page_fault+0x94/0x230 arch/x86/mm/fault.c:1531
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577
 copy_user_enhanced_fast_string+0xe/0x40 arch/x86/lib/copy_user_64.S:205
 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:58 [inline]
 copyout lib/iov_iter.c:190 [inline]
 copy_page_to_iter_iovec lib/iov_iter.c:261 [inline]
 copy_page_to_iter+0x32d/0x860 lib/iov_iter.c:973
 filemap_read+0xf06/0x1230 mm/filemap.c:2605
 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]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x0000000000363000 -> 0x0000000000363e00

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

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/06/03 19:38 upstream f88cd3fb9df2 0740de69 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fault / generic_write_end
2021/05/05 21:15 upstream a79cdfba68a1 06c27ff5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fault / generic_write_end
2021/03/12 10:03 upstream f78d76e72a46 429d8a6b .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in filemap_fault / generic_write_end
* Struck through repros no longer work on HEAD.