syzbot


KCSAN: data-race in generic_write_end / next_uptodate_folio (3)

Status: auto-obsoleted due to no activity on 2024/02/01 16:04
Subsystems: exfat
[Documentation on labels]
Reported-by: syzbot+6a2ae6f4dc618966c004@syzkaller.appspotmail.com
First crash: 396d, last: 396d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in generic_write_end / next_uptodate_folio (2) exfat 1 433d 413d 0/28 auto-obsoleted due to no activity on 2023/12/27 02:48
upstream KCSAN: data-race in generic_write_end / next_uptodate_folio exfat 1 468d 468d 0/28 auto-obsoleted due to no activity on 2023/11/21 13:01

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

write to 0xffff8881063b7a80 of 8 bytes by task 32758 on cpu 1:
 i_size_write include/linux/fs.h:932 [inline]
 generic_write_end+0x94/0x230 fs/buffer.c:2291
 fat_write_end+0x4e/0x160 fs/fat/inode.c:244
 cont_expand_zero fs/buffer.c:2514 [inline]
 cont_write_begin+0x2c0/0x690 fs/buffer.c:2572
 fat_write_begin+0x61/0xf0 fs/fat/inode.c:230
 generic_cont_expand_simple+0xa7/0x140 fs/buffer.c:2473
 fat_cont_expand+0x3a/0x160 fs/fat/file.c:223
 fat_setattr+0x2a9/0x840 fs/fat/file.c:513
 notify_change+0x866/0x8e0 fs/attr.c:499
 do_truncate+0x116/0x150 fs/open.c:66
 do_sys_ftruncate+0x2ba/0x3b0 fs/open.c:194
 __do_sys_ftruncate fs/open.c:205 [inline]
 __se_sys_ftruncate fs/open.c:203 [inline]
 __x64_sys_ftruncate+0x33/0x40 fs/open.c:203
 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 0xffff8881063b7a80 of 8 bytes by task 32759 on cpu 0:
 i_size_read include/linux/fs.h:910 [inline]
 next_uptodate_folio+0x5c9/0x7a0 mm/filemap.c:3417
 filemap_map_pages+0x708/0x900 mm/filemap.c:3565
 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: 0x000000000055f000 -> 0x0000000000561000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 32759 Comm: syz-executor.3 Not tainted 6.7.0-rc7-syzkaller-00016-gf5837722ffec #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/28 16:03 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_write_end / next_uptodate_folio
* Struck through repros no longer work on HEAD.