syzbot


KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete

Status: auto-closed as invalid on 2022/06/05 07:06
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 244d, last: 220d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete (2) 11 59d 181d 0/24 auto-obsoleted due to no activity on 2022/11/13 19:20

Sample crash report:
==================================================================
BUG: KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete

read-write to 0xffff888124455cc0 of 8 bytes by task 22191 on cpu 0:
 page_cache_delete+0x32c/0x360 mm/filemap.c:145
 __filemap_remove_folio+0x3b/0xf0 mm/filemap.c:223
 __remove_mapping+0x42a/0x530 mm/vmscan.c:1307
 shrink_page_list+0x1a98/0x3d40 mm/vmscan.c:1889
 reclaim_pages+0x4e4/0x660 mm/vmscan.c:2564
 madvise_cold_or_pageout_pte_range+0x7a4/0x7f0 mm/madvise.c:482
 walk_pmd_range mm/pagewalk.c:128 [inline]
 walk_pud_range mm/pagewalk.c:205 [inline]
 walk_p4d_range mm/pagewalk.c:240 [inline]
 walk_pgd_range mm/pagewalk.c:277 [inline]
 __walk_page_range+0x935/0x10c0 mm/pagewalk.c:379
 walk_page_range+0x121/0x2f0 mm/pagewalk.c:475
 madvise_pageout_page_range mm/madvise.c:540 [inline]
 madvise_pageout mm/madvise.c:577 [inline]
 madvise_vma_behavior mm/madvise.c:995 [inline]
 madvise_walk_vmas mm/madvise.c:1221 [inline]
 do_madvise+0xe0c/0x1300 mm/madvise.c:1399
 __do_sys_madvise mm/madvise.c:1412 [inline]
 __se_sys_madvise mm/madvise.c:1410 [inline]
 __x64_sys_madvise+0x5d/0x70 mm/madvise.c:1410
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888124455cc0 of 8 bytes by task 22190 on cpu 1:
 mapping_needs_writeback mm/filemap.c:627 [inline]
 filemap_write_and_wait_range+0x34/0x2e0 mm/filemap.c:672
 filemap_write_and_wait include/linux/pagemap.h:60 [inline]
 ext4_bmap+0xc5/0x190 fs/ext4/inode.c:3148
 bmap+0x5c/0x80 fs/inode.c:1795
 ioctl_fibmap fs/ioctl.c:77 [inline]
 file_ioctl fs/ioctl.c:327 [inline]
 do_vfs_ioctl+0x1240/0x1390 fs/ioctl.c:849
 __do_sys_ioctl fs/ioctl.c:868 [inline]
 __se_sys_ioctl+0x83/0x140 fs/ioctl.c:856
 __x64_sys_ioctl+0x3f/0x50 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x000000000000039a -> 0x0000000000000397

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

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/05/01 07:00 upstream 57ae8a492116 2df221f6 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/18 17:53 upstream b2d229d4ddb1 8bcc32a6 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/13 08:02 upstream a19944809fe9 faabdb86 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/13 03:04 upstream a19944809fe9 dacb3f1c .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/10 16:44 upstream 1862a69c9174 e22c3da3 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/08 19:56 upstream 1831fed55973 e22c3da3 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/08 09:58 upstream 42e7a03d3bad c6ff3e05 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
ci2-upstream-kcsan-gce 2022/04/07 16:56 upstream 3e732ebf7316 53c67432 .config log report info KCSAN: data-race in filemap_write_and_wait_range / page_cache_delete
* Struck through repros no longer work on HEAD.