syzbot


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

Status: auto-obsoleted due to no activity on 2024/04/08 00:15
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+aef01624d1d90b976063@syzkaller.appspotmail.com
First crash: 104d, last: 40d
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 709d 747d 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 969d 1041d 0/26 auto-closed as invalid on 2021/09/22 15:56
upstream KCSAN: data-race in xas_create / xas_find (5) fs mm 1 667d 667d 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 817d 933d 0/26 auto-closed as invalid on 2022/02/20 21:56
upstream KCSAN: data-race in xas_create / xas_find fs mm 2 1080d 1093d 0/26 auto-closed as invalid on 2021/06/03 16:29

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

write to 0xffff88813d456249 of 1 bytes by task 25914 on cpu 0:
 xas_expand lib/xarray.c:612 [inline]
 xas_create+0x656/0xbb0 lib/xarray.c:653
 xas_store+0x78/0xc90 lib/xarray.c:787
 __filemap_add_folio+0x45e/0x730 mm/filemap.c:899
 filemap_add_folio+0x70/0x160 mm/filemap.c:938
 page_cache_ra_unbounded+0x15e/0x2e0 mm/readahead.c:250
 do_page_cache_ra mm/readahead.c:299 [inline]
 force_page_cache_ra mm/readahead.c:330 [inline]
 page_cache_sync_ra+0x24b/0x2a0 mm/readahead.c:689
 page_cache_sync_readahead include/linux/pagemap.h:1300 [inline]
 filemap_get_pages+0x251/0xf90 mm/filemap.c:2498
 filemap_read+0x214/0x680 mm/filemap.c:2594
 blkdev_read_iter+0x217/0x2c0 block/fops.c:757
 call_read_iter include/linux/fs.h:2081 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x5ab/0x6a0 fs/read_write.c:476
 ksys_read+0xeb/0x1a0 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:627
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88813d456249 of 1 bytes by task 29835 on cpu 1:
 xas_find+0x372/0x3f0 lib/xarray.c:1262
 find_get_entry mm/filemap.c:1959 [inline]
 find_lock_entries+0xb1/0x680 mm/filemap.c:2060
 truncate_inode_pages_range+0x130/0x6a0 mm/truncate.c:354
 truncate_inode_pages+0x24/0x30 mm/truncate.c:439
 kill_bdev block/bdev.c:79 [inline]
 set_blocksize+0x26c/0x290 block/bdev.c:155
 sb_set_blocksize block/bdev.c:164 [inline]
 sb_min_blocksize+0x83/0x110 block/bdev.c:180
 ext4_load_super fs/ext4/super.c:5030 [inline]
 __ext4_fill_super fs/ext4/super.c:5227 [inline]
 ext4_fill_super+0x39f/0x39b0 fs/ext4/super.c:5703
 get_tree_bdev+0x250/0x2e0 fs/super.c:1614
 ext4_get_tree+0x1c/0x20 fs/ext4/super.c:5735
 vfs_get_tree+0x53/0x1d0 fs/super.c:1779
 do_new_mount+0x227/0x690 fs/namespace.c:3352
 path_mount+0x496/0xb30 fs/namespace.c:3679
 do_mount fs/namespace.c:3692 [inline]
 __do_sys_mount fs/namespace.c:3898 [inline]
 __se_sys_mount+0x27f/0x2d0 fs/namespace.c:3875
 __x64_sys_mount+0x67/0x80 fs/namespace.c:3875
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x01 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 29835 Comm: syz-executor.3 Not tainted 6.8.0-rc6-syzkaller-00278-g58c806d867bf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================
EXT4-fs: Project quota feature not enabled. Cannot enable project quota enforcement.

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/04 00:14 upstream 58c806d867bf 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
2024/02/11 04:07 upstream a5b6244cf87c 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
2024/01/24 00:08 upstream 7ed2632ec7d7 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find
2023/12/31 14:01 upstream 453f5db0619e fb427a07 .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.