syzbot


KCSAN: data-race in next_uptodate_folio / simple_write_end

Status: auto-obsoleted due to no activity on 2024/01/15 00:09
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+739fe2126a12bf239175@syzkaller.appspotmail.com
First crash: 486d, last: 414d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in next_uptodate_folio / simple_write_end

write to 0xffff88810663fd90 of 8 bytes by task 13980 on cpu 1:
 i_size_write include/linux/fs.h:932 [inline]
 simple_write_end+0x26c/0x380 fs/libfs.c:894
 generic_perform_write+0x267/0x410 mm/filemap.c:3929
 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4013
 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4039
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x48a/0x790 fs/read_write.c:584
 ksys_write+0xeb/0x1a0 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:646
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88810663fd90 of 8 bytes by task 13983 on cpu 0:
 i_size_read include/linux/fs.h:910 [inline]
 next_uptodate_folio+0x5c9/0x7a0 mm/filemap.c:3408
 filemap_map_pages+0x708/0x900 mm/filemap.c:3556
 do_fault_around mm/memory.c:4587 [inline]
 do_read_fault mm/memory.c:4620 [inline]
 do_fault mm/memory.c:4763 [inline]
 do_pte_missing mm/memory.c:3731 [inline]
 handle_pte_fault mm/memory.c:5039 [inline]
 __handle_mm_fault mm/memory.c:5180 [inline]
 handle_mm_fault+0x1239/0x2dd0 mm/memory.c:5345
 faultin_page mm/gup.c:956 [inline]
 __get_user_pages+0x402/0xe40 mm/gup.c:1239
 populate_vma_page_range mm/gup.c:1677 [inline]
 __mm_populate+0x216/0x330 mm/gup.c:1786
 mm_populate include/linux/mm.h:3379 [inline]
 vm_mmap_pgoff+0x1a7/0x240 mm/util.c:561
 ksys_mmap_pgoff+0x2b8/0x330 mm/mmap.c:1425
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000d9f000 -> 0x0000000000da1000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 13983 Comm: syz-executor.5 Not tainted 6.7.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/11 00:08 upstream a39b6ac3781d 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/12/06 15:08 upstream bee0e7762ad2 e3299f55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/12/02 15:19 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/11/29 06:41 upstream 18d46e76d7c2 1adfb6f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/11/28 06:17 upstream df60cee26a2e 7ec6c044 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/11/27 15:32 upstream 2cc14f52aeb7 7ec6c044 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/11/17 07:42 upstream 7475e51b8796 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/11/15 06:47 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/26 19:54 upstream 3a568e3a961b 23afc60f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/26 12:31 upstream 611da07b89fd 23afc60f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/24 18:43 upstream d88520ad73b7 17e6d526 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/16 19:07 upstream 58720809f527 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/09 16:36 upstream 94f6f0550c62 3c53c7d9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/10/08 17:08 upstream b9ddbb0cde2a 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
2023/09/30 02:47 upstream 71e58659bfc0 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in next_uptodate_folio / simple_write_end
* Struck through repros no longer work on HEAD.