syzbot


KCSAN: data-race in xas_create / xas_find_marked (4)

Status: auto-obsoleted due to no activity on 2022/12/10 21:02
Subsystems: fs mm
[Documentation on labels]
First crash: 771d, last: 767d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_create / xas_find_marked (6) mm fs 3 312d 347d 0/28 auto-obsoleted due to no activity on 2024/03/09 19:07
upstream KCSAN: data-race in xas_create / xas_find_marked (2) fs mm 1 1143d 1143d 0/28 auto-closed as invalid on 2021/11/29 22:24
upstream KCSAN: data-race in xas_create / xas_find_marked (7) fs mm 1 40d 40d 0/28 moderation: reported on 2024/11/01 12:36
upstream KCSAN: data-race in xas_create / xas_find_marked (3) fs mm 1 941d 941d 0/28 auto-closed as invalid on 2022/06/19 06:15
upstream KCSAN: data-race in xas_create / xas_find_marked (5) fs mm 3 424d 460d 0/28 auto-obsoleted due to no activity on 2023/11/18 23:30
upstream KCSAN: data-race in xas_create / xas_find_marked fs mm 1 1231d 1231d 0/28 auto-closed as invalid on 2021/09/03 00:06

Sample crash report:
loop2: detected capacity change from 0 to 1054
==================================================================
BUG: KCSAN: data-race in xas_create / xas_find_marked

write to 0xffff88810aeed901 of 1 bytes by task 7707 on cpu 0:
 xas_expand lib/xarray.c:614 [inline]
 xas_create+0x6aa/0xc20 lib/xarray.c:655
 xas_store+0x6c/0xd00 lib/xarray.c:789
 __filemap_add_folio+0x30f/0x6e0 mm/filemap.c:895
 filemap_add_folio+0x6b/0x150 mm/filemap.c:934
 page_cache_ra_unbounded+0x1a0/0x320 mm/readahead.c:251
 do_page_cache_ra mm/readahead.c:300 [inline]
 force_page_cache_ra+0x1c6/0x200 mm/readahead.c:331
 page_cache_sync_ra+0xc8/0xf0 mm/readahead.c:705
 page_cache_sync_readahead include/linux/pagemap.h:1213 [inline]
 filemap_get_pages mm/filemap.c:2581 [inline]
 filemap_read+0x3fd/0x1510 mm/filemap.c:2675
 blkdev_read_iter+0x2c6/0x370 block/fops.c:598
 call_read_iter include/linux/fs.h:2185 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3a5/0x560 fs/read_write.c:470
 ksys_read+0xe8/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:621
 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+0x63/0xcd

read to 0xffff88810aeed901 of 1 bytes by task 19562 on cpu 1:
 xas_find_marked+0x45f/0x6a0 lib/xarray.c:1340
 find_get_entry mm/filemap.c:2005 [inline]
 find_get_pages_range_tag+0x102/0x420 mm/filemap.c:2292
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1105
 __filemap_fdatawait_range+0xba/0x260 mm/filemap.c:516
 filemap_write_and_wait_range+0xfc/0x1d0 mm/filemap.c:683
 filemap_write_and_wait include/linux/pagemap.h:60 [inline]
 sync_blockdev block/bdev.c:198 [inline]
 set_blocksize+0x1c4/0x270 block/bdev.c:150
 sb_set_blocksize block/bdev.c:161 [inline]
 sb_min_blocksize+0x92/0x110 block/bdev.c:177
 ext4_load_super fs/ext4/super.c:4931 [inline]
 __ext4_fill_super fs/ext4/super.c:5056 [inline]
 ext4_fill_super+0x35c/0x4560 fs/ext4/super.c:5643
 get_tree_bdev+0x2b4/0x3b0 fs/super.c:1324
 ext4_get_tree+0x18/0x20 fs/ext4/super.c:5673
 vfs_get_tree+0x49/0x190 fs/super.c:1531
 do_new_mount+0x200/0x650 fs/namespace.c:3040
 path_mount+0x4aa/0xb70 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x281/0x2d0 fs/namespace.c:3568
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3568
 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+0x63/0xcd

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19562 Comm: syz-executor.2 Not tainted 6.1.0-rc3-syzkaller-00288-gb208b9fbbcba-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
==================================================================
EXT4-fs (loop2): inodes count not valid: 227872 vs 32

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/05 20:56 upstream b208b9fbbcba 6d752409 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
2022/11/01 18:52 upstream 5aaef24b5c6d a1d8560a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
* Struck through repros no longer work on HEAD.