syzbot


KCSAN: data-race in shmem_get_folio_gfp / shmem_writepage

Status: auto-obsoleted due to no activity on 2023/09/27 21:50
Subsystems: mm
[Documentation on labels]
First crash: 528d, last: 523d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in shmem_get_folio_gfp / shmem_writepage

read-write to 0xffff888138d08578 of 8 bytes by task 27873 on cpu 0:
 shmem_delete_from_page_cache mm/shmem.c:773 [inline]
 shmem_writepage+0x88e/0xb40 mm/shmem.c:1438
 pageout mm/vmscan.c:1355 [inline]
 shrink_folio_list+0x195e/0x2550 mm/vmscan.c:2015
 reclaim_folio_list+0x7b/0x1d0 mm/vmscan.c:2801
 reclaim_pages+0x220/0x280 mm/vmscan.c:2837
 madvise_cold_or_pageout_pte_range+0x82c/0x890 mm/madvise.c:529
 walk_pmd_range mm/pagewalk.c:143 [inline]
 walk_pud_range mm/pagewalk.c:221 [inline]
 walk_p4d_range mm/pagewalk.c:256 [inline]
 walk_pgd_range+0x7f4/0xe20 mm/pagewalk.c:293
 __walk_page_range+0xc2/0x320 mm/pagewalk.c:395
 walk_page_range+0x20b/0x330 mm/pagewalk.c:493
 madvise_pageout_page_range mm/madvise.c:587 [inline]
 madvise_pageout mm/madvise.c:614 [inline]
 madvise_vma_behavior mm/madvise.c:1035 [inline]
 madvise_walk_vmas mm/madvise.c:1264 [inline]
 do_madvise+0x1eea/0x29b0 mm/madvise.c:1444
 __do_sys_madvise mm/madvise.c:1457 [inline]
 __se_sys_madvise mm/madvise.c:1455 [inline]
 __x64_sys_madvise+0x60/0x70 mm/madvise.c:1455
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff888138d08578 of 8 bytes by task 27877 on cpu 1:
 shmem_recalc_inode mm/shmem.c:360 [inline]
 shmem_get_folio_gfp+0xe1e/0x1200 mm/shmem.c:1988
 shmem_get_folio mm/shmem.c:2079 [inline]
 shmem_write_begin+0xa6/0x1d0 mm/shmem.c:2573
 generic_perform_write+0x1cf/0x410 mm/filemap.c:3923
 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4018
 generic_file_write_iter+0x7d/0x1c0 mm/filemap.c:4044
 call_write_iter include/linux/fs.h:1877 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x4ab/0x7d0 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:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000000000000b04 -> 0x0000000000000b03

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27877 Comm: syz-executor.1 Not tainted 6.5.0-rc7-syzkaller-00018-g89bf6209cad6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/23 21:41 upstream 89bf6209cad6 b81ca3f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_get_folio_gfp / shmem_writepage
2023/08/18 04:49 upstream 16931859a650 74b106b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in shmem_get_folio_gfp / shmem_writepage
* Struck through repros no longer work on HEAD.