syzbot


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

Status: auto-obsoleted due to no activity on 2023/11/18 23:30
Subsystems: fs mm
[Documentation on labels]
First crash: 263d, last: 227d
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 570d 574d 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 115d 151d 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 946d 946d 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 745d 745d 0/26 auto-closed as invalid on 2022/06/19 06:15
upstream KCSAN: data-race in xas_create / xas_find_marked fs mm 1 1034d 1034d 0/26 auto-closed as invalid on 2021/09/03 00:06

Sample crash report:
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in xas_create / xas_find_marked

write to 0xffff88810672d489 of 1 bytes by task 3192 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+0x360/0x750 mm/filemap.c:900
 filemap_add_folio+0x70/0x160 mm/filemap.c:939
 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:691
 page_cache_sync_readahead include/linux/pagemap.h:1293 [inline]
 filemap_get_pages+0x251/0xe90 mm/filemap.c:2556
 filemap_read+0x214/0x680 mm/filemap.c:2652
 blkdev_read_iter+0x217/0x2c0 block/fops.c:730
 call_read_iter include/linux/fs.h:1950 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x3da/0x5c0 fs/read_write.c:470
 ksys_read+0xeb/0x1a0 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:621
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffff88810672d489 of 1 bytes by task 3093 on cpu 1:
 xas_find_marked+0x419/0x660 lib/xarray.c:1338
 find_get_entry+0x5d/0x290 mm/filemap.c:1978
 filemap_get_folios_tag+0xa2/0x250 mm/filemap.c:2266
 __filemap_fdatawait_range+0x82/0x140 mm/filemap.c:516
 filemap_write_and_wait_range+0x11a/0x210 mm/filemap.c:687
 filemap_write_and_wait include/linux/pagemap.h:64 [inline]
 sync_blockdev+0x42/0x50 block/bdev.c:198
 sync_filesystem+0x15c/0x180 fs/sync.c:70
 ext4_quota_off+0xb4/0x280 fs/ext4/super.c:7101
 ext4_quotas_off fs/ext4/super.c:1192 [inline]
 ext4_put_super+0xad/0x7d0 fs/ext4/super.c:1307
 generic_shutdown_super+0xdb/0x210 fs/super.c:693
 kill_block_super+0x2a/0x60 fs/super.c:1646
 ext4_kill_sb+0x44/0x80 fs/ext4/super.c:7305
 deactivate_locked_super+0x73/0x1c0 fs/super.c:481
 deactivate_super+0x9b/0xb0 fs/super.c:514
 cleanup_mnt+0x272/0x2e0 fs/namespace.c:1254
 __cleanup_mnt+0x19/0x20 fs/namespace.c:1261
 task_work_run+0x135/0x1a0 kernel/task_work.c:180
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd6/0xe0 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x17 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3093 Comm: syz-executor.0 Not tainted 6.6.0-rc5-syzkaller-00250-g70f8c6f8f880 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
==================================================================
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/14 23:25 upstream 70f8c6f8f880 f757a323 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
2023/09/15 06:59 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
2023/09/09 01:14 upstream a48fa7efaf11 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in xas_create / xas_find_marked
* Struck through repros no longer work on HEAD.