syzbot


KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp

Status: auto-closed as invalid on 2022/04/23 14:16
Subsystems: mm
[Documentation on labels]
First crash: 1108d, last: 1046d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp

write to 0xffff888137ed7b50 of 8 bytes by task 28869 on cpu 1:
 page_cache_delete mm/filemap.c:145 [inline]
 __filemap_remove_folio+0x1e1/0x2c0 mm/filemap.c:219
 __delete_from_page_cache include/linux/pagemap.h:934 [inline]
 __remove_mapping+0x49d/0x600 mm/vmscan.c:1319
 shrink_page_list+0x1508/0x2620 mm/vmscan.c:1894
 reclaim_pages+0x478/0x640 mm/vmscan.c:2638
 madvise_cold_or_pageout_pte_range+0x63f/0x680 mm/madvise.c:481
 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+0x981/0x1160 mm/pagewalk.c:379
 walk_page_range+0x131/0x300 mm/pagewalk.c:475
 madvise_pageout_page_range mm/madvise.c:534 [inline]
 madvise_pageout mm/madvise.c:571 [inline]
 madvise_vma_behavior mm/madvise.c:961 [inline]
 madvise_walk_vmas mm/madvise.c:1183 [inline]
 do_madvise+0xd11/0x1170 mm/madvise.c:1361
 __do_sys_madvise mm/madvise.c:1374 [inline]
 __se_sys_madvise mm/madvise.c:1372 [inline]
 __x64_sys_madvise+0x5d/0x70 mm/madvise.c:1372
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888137ed7b50 of 8 bytes by task 28870 on cpu 0:
 shmem_recalc_inode mm/shmem.c:362 [inline]
 shmem_getpage_gfp+0xf1b/0x12c0 mm/shmem.c:1912
 shmem_fault+0xd1/0x3c0 mm/shmem.c:2080
 __do_fault mm/memory.c:3868 [inline]
 do_read_fault mm/memory.c:4183 [inline]
 do_fault mm/memory.c:4312 [inline]
 handle_pte_fault mm/memory.c:4570 [inline]
 __handle_mm_fault mm/memory.c:4705 [inline]
 handle_mm_fault+0xba6/0x1590 mm/memory.c:4803
 faultin_page mm/gup.c:969 [inline]
 __get_user_pages+0x342/0xc10 mm/gup.c:1190
 populate_vma_page_range mm/gup.c:1522 [inline]
 __mm_populate+0x24d/0x370 mm/gup.c:1631
 mm_populate include/linux/mm.h:2702 [inline]
 vm_mmap_pgoff+0x160/0x1f0 mm/util.c:524
 ksys_mmap_pgoff+0xc2/0x320 mm/mmap.c:1630
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000000001e9 -> 0x00000000000001e3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 28870 Comm: syz-executor.5 Not tainted 5.17.0-rc8-syzkaller-00061-g34e047aa16c0-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/03/19 14:12 upstream 34e047aa16c0 e2d91b1d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/24 03:26 upstream 23d04328444a 6e821dbf .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/17 19:47 upstream a3580ac9b7a3 3cd800e4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/13 11:50 upstream b81b1829e7e3 8b9ca619 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/12 16:00 upstream 83e396641110 8b9ca619 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/09 18:41 upstream f4bc5bbb5fef 0b33604d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/09 05:36 upstream e6251ab4551f 0b33604d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/08 21:54 upstream 555f3d7be91a 0b33604d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/08 01:05 upstream 2ade8eef993c a7dab638 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/02 20:52 upstream 27bb0b18c208 4ebb2798 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/02 06:52 upstream 9f7fb8de5d9b 4ebb2798 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/01 22:24 upstream 9f7fb8de5d9b c1c1631d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/02/01 00:30 upstream 26291c54e111 6b7c57fe .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/31 08:14 upstream 26291c54e111 a491ad2d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/31 02:25 upstream 26291c54e111 495e00c5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/29 23:23 upstream f8c7e4ede46f 495e00c5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/28 22:42 upstream df0001545b27 495e00c5 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/26 06:27 upstream 0280e3c58f92 2cbffd88 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/24 12:28 upstream dd81e1c7d5fb 214351e1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/21 22:10 upstream 9b57f4589857 214351e1 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
2022/01/16 10:26 upstream d0a231f01e5b 723cfaf0 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __filemap_remove_folio / shmem_getpage_gfp
* Struck through repros no longer work on HEAD.