syzbot


KCSAN: data-race in xas_create / xas_find_marked

Status: auto-closed as invalid on 2021/09/03 00:06
Subsystems: fs mm
[Documentation on labels]
First crash: 1027d, last: 1027d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_create / xas_find_marked (4) fs mm 2 563d 567d 0/26 auto-obsoleted due to no activity on 2022/12/10 21:02
upstream KCSAN: data-race in xas_create / xas_find_marked (6) mm fs 3 108d 144d 0/26 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 939d 939d 0/26 auto-closed as invalid on 2021/11/29 22:24
upstream KCSAN: data-race in xas_create / xas_find_marked (3) fs mm 1 738d 738d 0/26 auto-closed as invalid on 2022/06/19 06:15
upstream KCSAN: data-race in xas_create / xas_find_marked (5) fs mm 3 220d 256d 0/26 auto-obsoleted due to no activity on 2023/11/18 23:30

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

write to 0xffff888106e09d81 of 1 bytes by task 21178 on cpu 1:
 xas_expand lib/xarray.c:611 [inline]
 xas_create+0x699/0xb30 lib/xarray.c:652
 xas_store+0x70/0xca0 lib/xarray.c:784
 __add_to_page_cache_locked+0x1eb/0x4b0 mm/filemap.c:910
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:967
 page_cache_ra_unbounded+0x262/0x410 mm/readahead.c:221
 do_page_cache_ra mm/readahead.c:267 [inline]
 force_page_cache_ra+0x246/0x280 mm/readahead.c:299
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:573
 page_cache_sync_readahead include/linux/pagemap.h:884 [inline]
 filemap_get_pages mm/filemap.c:2467 [inline]
 filemap_read+0x388/0x1220 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1669
 call_read_iter include/linux/fs.h:2108 [inline]
 new_sync_read fs/read_write.c:415 [inline]
 vfs_read+0x565/0x5d0 fs/read_write.c:496
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106e09d81 of 1 bytes by task 21199 on cpu 0:
 xas_find_marked+0x3ae/0x5f0 lib/xarray.c:1333
 find_get_entry mm/filemap.c:1925 [inline]
 find_get_pages_range_tag+0xf2/0x390 mm/filemap.c:2216
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1123
 __filemap_fdatawait_range+0xab/0x1b0 mm/filemap.c:510
 filemap_fdatawait_range mm/filemap.c:545 [inline]
 filemap_write_and_wait_range+0x264/0x390 mm/filemap.c:695
 filemap_write_and_wait include/linux/fs.h:2897 [inline]
 __sync_blockdev fs/block_dev.c:526 [inline]
 sync_blockdev fs/block_dev.c:535 [inline]
 set_blocksize+0x1c4/0x270 fs/block_dev.c:164
 sb_set_blocksize fs/block_dev.c:175 [inline]
 sb_min_blocksize+0x9d/0x120 fs/block_dev.c:191
 isofs_fill_super+0x6f3/0x1940 fs/isofs/inode.c:657
 mount_bdev+0x1e8/0x290 fs/super.c:1368
 isofs_mount+0x2d/0x40 fs/isofs/inode.c:1566
 legacy_get_tree+0x70/0xc0 fs/fs_context.c:610
 vfs_get_tree+0x4a/0x1a0 fs/super.c:1498
 do_new_mount fs/namespace.c:2905 [inline]
 path_mount+0x11d4/0x1ce0 fs/namespace.c:3235
 do_mount fs/namespace.c:3248 [inline]
 __do_sys_mount fs/namespace.c:3456 [inline]
 __se_sys_mount+0x23d/0x2e0 fs/namespace.c:3433
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3433
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x1a -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 21199 Comm: syz-executor.1 Not tainted 5.14.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/29 16:48 upstream 4010a528219e 8a799410 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
* Struck through repros no longer work on HEAD.