syzbot


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

Status: auto-closed as invalid on 2021/11/29 22:24
Subsystems: fs mm
[Documentation on labels]
First crash: 1141d, last: 1141d
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 (4) fs mm 2 765d 769d 0/28 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 310d 346d 0/28 auto-obsoleted due to no activity on 2024/03/09 19:07
upstream KCSAN: data-race in xas_create / xas_find_marked (7) fs mm 1 39d 39d 0/28 moderation: reported on 2024/11/01 12:36
upstream KCSAN: data-race in xas_create / xas_find_marked (3) fs mm 1 940d 940d 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 422d 458d 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 1230d 1230d 0/28 auto-closed as invalid on 2021/09/03 00:06

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

write to 0xffff8881049e0d81 of 1 bytes by task 17949 on cpu 0:
 xas_expand lib/xarray.c:611 [inline]
 xas_create+0x679/0xb10 lib/xarray.c:652
 xas_store+0x70/0xca0 lib/xarray.c:784
 __add_to_page_cache_locked+0x20b/0x4f0 mm/filemap.c:927
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:984
 page_cache_ra_unbounded+0x274/0x430 mm/readahead.c:222
 do_page_cache_ra mm/readahead.c:269 [inline]
 force_page_cache_ra+0x256/0x290 mm/readahead.c:301
 page_cache_sync_ra+0xcc/0xe0 mm/readahead.c:575
 page_cache_sync_readahead include/linux/pagemap.h:883 [inline]
 filemap_get_pages mm/filemap.c:2545 [inline]
 filemap_read+0x3ad/0x1220 mm/filemap.c:2628
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2779
 blkdev_read_iter+0xb9/0xf0 block/fops.c:545
 call_read_iter include/linux/fs.h:2157 [inline]
 new_sync_read fs/read_write.c:404 [inline]
 vfs_read+0x66c/0x750 fs/read_write.c:485
 ksys_read+0xd9/0x190 fs/read_write.c:623
 __do_sys_read fs/read_write.c:633 [inline]
 __se_sys_read fs/read_write.c:631 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:631
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881049e0d81 of 1 bytes by task 19949 on cpu 1:
 xas_find_marked+0x3ae/0x5f0 lib/xarray.c:1333
 find_get_entry mm/filemap.c:1980 [inline]
 find_get_pages_range_tag+0x102/0x3a0 mm/filemap.c:2271
 pagevec_lookup_range_tag+0x37/0x50 mm/swap.c:1114
 __filemap_fdatawait_range+0xcb/0x1d0 mm/filemap.c:528
 filemap_fdatawait_range mm/filemap.c:563 [inline]
 filemap_write_and_wait_range+0x298/0x3c0 mm/filemap.c:713
 filemap_write_and_wait include/linux/fs.h:2865 [inline]
 __sync_blockdev block/bdev.c:193 [inline]
 sync_blockdev block/bdev.c:202 [inline]
 set_blocksize+0x1c4/0x270 block/bdev.c:155
 sb_set_blocksize+0x2c/0xa0 block/bdev.c:166
 ext4_fill_super+0x2287/0x7830 fs/ext4/super.c:4327
 mount_bdev+0x1e8/0x290 fs/super.c:1368
 ext4_mount+0x2d/0x40 fs/ext4/super.c:6515
 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:2988 [inline]
 path_mount+0x11ec/0x1d20 fs/namespace.c:3318
 do_mount fs/namespace.c:3331 [inline]
 __do_sys_mount fs/namespace.c:3539 [inline]
 __se_sys_mount+0x24b/0x2f0 fs/namespace.c:3516
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3516
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x1c -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 19949 Comm: syz-executor.0 Not tainted 5.15.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
EXT4-fs warning (device loop0): ext4_multi_mount_protect:330: MMP startup interrupted, failing mount


Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/10/25 22:15 upstream 87066fdd2e30 c1132b49 .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.