syzbot


KCSAN: data-race in xas_create / xas_find (8)

Status: moderation: reported on 2024/10/04 23:49
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+6ebf6bd7a203717bf168@syzkaller.appspotmail.com
First crash: 18h42m, last: 18h42m
Similar bugs (7)
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 884d 922d 0/28 auto-closed as invalid on 2022/06/09 16:26
upstream KCSAN: data-race in xas_create / xas_find (2) fs mm 5 1144d 1216d 0/28 auto-closed as invalid on 2021/09/22 15:56
upstream KCSAN: data-race in xas_create / xas_find (6) fs mm 4 215d 279d 0/28 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 842d 842d 0/28 auto-closed as invalid on 2022/07/21 09:43
upstream KCSAN: data-race in xas_create / xas_find (3) mm fs 11 992d 1108d 0/28 auto-closed as invalid on 2022/02/20 21:56
upstream KCSAN: data-race in xas_create / xas_find fs mm 2 1255d 1268d 0/28 auto-closed as invalid on 2021/06/03 16:29
upstream KCSAN: data-race in xas_create / xas_find (7) fs mm 1 42d 42d 0/28 auto-obsoleted due to no activity on 2024/09/28 12:31

Sample crash report:
loop4: detected capacity change from 0 to 4096
EXT4-fs: Ignoring removed nobh option
EXT4-fs: Ignoring removed i_version option
==================================================================
BUG: KCSAN: data-race in xas_create / xas_find

write to 0xffff888106819919 of 1 bytes by task 3435 on cpu 0:
 xas_expand lib/xarray.c:613 [inline]
 xas_create+0x666/0xbd0 lib/xarray.c:654
 xas_store+0x6f/0xc90 lib/xarray.c:788
 __filemap_add_folio+0x3cc/0x6f0 mm/filemap.c:916
 filemap_add_folio+0x9c/0x1b0 mm/filemap.c:972
 page_cache_ra_unbounded+0x175/0x310 mm/readahead.c:268
 do_page_cache_ra mm/readahead.c:320 [inline]
 force_page_cache_ra mm/readahead.c:349 [inline]
 page_cache_sync_ra+0x252/0x670 mm/readahead.c:562
 page_cache_sync_readahead include/linux/pagemap.h:1394 [inline]
 filemap_get_pages+0x2c1/0x10e0 mm/filemap.c:2547
 filemap_read+0x216/0x680 mm/filemap.c:2645
 blkdev_read_iter+0x20e/0x2c0 block/fops.c:765
 new_sync_read fs/read_write.c:488 [inline]
 vfs_read+0x5f6/0x720 fs/read_write.c:569
 ksys_read+0xeb/0x1b0 fs/read_write.c:712
 __do_sys_read fs/read_write.c:722 [inline]
 __se_sys_read fs/read_write.c:720 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:720
 x64_sys_call+0x27d3/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888106819919 of 1 bytes by task 9109 on cpu 1:
 xas_find+0x372/0x3f0 lib/xarray.c:1278
 find_get_entry+0x66/0x390 mm/filemap.c:1992
 find_get_entries+0xa4/0x220 mm/filemap.c:2047
 truncate_inode_pages_range+0x4ac/0x6b0 mm/truncate.c:378
 truncate_inode_pages+0x24/0x30 mm/truncate.c:423
 kill_bdev block/bdev.c:91 [inline]
 set_blocksize+0x258/0x270 block/bdev.c:173
 sb_set_blocksize block/bdev.c:182 [inline]
 sb_min_blocksize+0x63/0xe0 block/bdev.c:198
 ext4_load_super fs/ext4/super.c:4992 [inline]
 __ext4_fill_super fs/ext4/super.c:5213 [inline]
 ext4_fill_super+0x38b/0x3a10 fs/ext4/super.c:5686
 get_tree_bdev+0x256/0x2e0 fs/super.c:1635
 ext4_get_tree+0x1c/0x30 fs/ext4/super.c:5718
 vfs_get_tree+0x56/0x1e0 fs/super.c:1800
 do_new_mount+0x227/0x690 fs/namespace.c:3507
 path_mount+0x49b/0xb30 fs/namespace.c:3834
 do_mount fs/namespace.c:3847 [inline]
 __do_sys_mount fs/namespace.c:4055 [inline]
 __se_sys_mount+0x27c/0x2d0 fs/namespace.c:4032
 __x64_sys_mount+0x67/0x80 fs/namespace.c:4032
 x64_sys_call+0x203e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:166
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0e -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 9109 Comm: syz.4.1794 Not tainted 6.12.0-rc1-syzkaller-00257-g2f91ff27b0ee #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================
EXT4-fs (loop4): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: writeback.
EXT4-fs (loop4): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/04 23:49 upstream 2f91ff27b0ee d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
* Struck through repros no longer work on HEAD.