syzbot


KCSAN: data-race in xas_create / xas_find

Status: auto-closed as invalid on 2021/06/03 16:29
Subsystems: fs mm
[Documentation on labels]
First crash: 1118d, last: 1104d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_create / xas_find (4) fs mm 3 733d 771d 0/26 auto-closed as invalid on 2022/06/09 16:26
upstream KCSAN: data-race in xas_create / xas_find (2) fs mm 5 993d 1066d 0/26 auto-closed as invalid on 2021/09/22 15:56
upstream KCSAN: data-race in xas_create / xas_find (6) fs mm 4 65d 129d 0/26 auto-obsoleted due to no activity on 2024/04/08 00:15
upstream KCSAN: data-race in xas_create / xas_find (5) fs mm 1 692d 692d 0/26 auto-closed as invalid on 2022/07/21 09:43
upstream KCSAN: data-race in xas_create / xas_find (3) mm fs 11 842d 958d 0/26 auto-closed as invalid on 2022/02/20 21:56

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

write to 0xffff888135e0db41 of 1 bytes by task 1865 on cpu 1:
 xas_expand lib/xarray.c:611 [inline]
 xas_create+0x699/0xb30 lib/xarray.c:652
 xas_store+0x70/0xc90 lib/xarray.c:784
 __add_to_page_cache_locked+0x200/0x520 mm/filemap.c:881
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:940
 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:864 [inline]
 filemap_get_pages mm/filemap.c:2442 [inline]
 filemap_read+0x388/0x1230 mm/filemap.c:2525
 generic_file_read_iter+0x84/0x3e0 mm/filemap.c:2676
 blkdev_read_iter+0xb3/0xc0 fs/block_dev.c:1720
 call_read_iter include/linux/fs.h:2110 [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_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888135e0db41 of 1 bytes by task 1898 on cpu 0:
 xas_find+0x2d9/0x3c0 lib/xarray.c:1257
 find_get_entry mm/filemap.c:1896 [inline]
 find_lock_entries+0x90/0x520 mm/filemap.c:2010
 truncate_inode_pages_range+0x12b/0xac0 mm/truncate.c:324
 truncate_inode_pages+0x20/0x30 mm/truncate.c:428
 kill_bdev fs/block_dev.c:86 [inline]
 set_blocksize+0x286/0x2a0 fs/block_dev.c:166
 sb_set_blocksize+0x2c/0xa0 fs/block_dev.c:175
 ext4_fill_super+0x20e5/0x7f90 fs/ext4/super.c:4455
 mount_bdev+0x1e8/0x290 fs/super.c:1367
 ext4_mount+0x2d/0x40 fs/ext4/super.c:6605
 legacy_get_tree+0x70/0xc0 fs/fs_context.c:592
 vfs_get_tree+0x4a/0x1a0 fs/super.c:1497
 do_new_mount fs/namespace.c:2905 [inline]
 path_mount+0x11d6/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_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1898 Comm: syz-executor.2 Not tainted 5.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
EXT4-fs (loop2): bad geometry: first data block 3072 is beyond end of filesystem (128)

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/29 16:29 upstream d72cd4ad4174 77e2b668 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
2021/04/16 01:20 upstream 7f75285ca572 c59079a6 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
* Struck through repros no longer work on HEAD.