syzbot


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

Status: auto-closed as invalid on 2021/09/22 15:56
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 541d, last: 469d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in xas_create / xas_find (4) 3 209d 247d 0/24 auto-closed as invalid on 2022/06/09 16:26
upstream KCSAN: data-race in xas_create / xas_find (5) 1 167d 167d 0/24 auto-closed as invalid on 2022/07/21 09:43
upstream KCSAN: data-race in xas_create / xas_find (3) 11 318d 434d 0/24 auto-closed as invalid on 2022/02/20 21:56
upstream KCSAN: data-race in xas_create / xas_find 2 580d 593d 0/24 auto-closed as invalid on 2021/06/03 16:29

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

write to 0xffff888106e8fd81 of 1 bytes by task 6142 on cpu 0:
 xas_expand lib/xarray.c:611 [inline]
 xas_create+0x699/0xb30 lib/xarray.c:652
 xas_store+0x70/0xca0 lib/xarray.c:784
 __add_to_page_cache_locked+0x1eb/0x4b0 mm/filemap.c:910
 add_to_page_cache_lru+0xa0/0x1b0 mm/filemap.c:967
 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:884 [inline]
 filemap_get_pages mm/filemap.c:2467 [inline]
 filemap_read+0x388/0x1220 mm/filemap.c:2550
 generic_file_read_iter+0x75/0x2c0 mm/filemap.c:2701
 blkdev_read_iter+0xb9/0xf0 fs/block_dev.c:1671
 call_read_iter include/linux/fs.h:2108 [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_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888106e8fd81 of 1 bytes by task 6156 on cpu 1:
 xas_find+0x2d9/0x3c0 lib/xarray.c:1257
 find_get_entry mm/filemap.c:1923 [inline]
 find_lock_entries+0x90/0x520 mm/filemap.c:2037
 truncate_inode_pages_range+0xfb/0xa70 mm/truncate.c:320
 truncate_inode_pages+0x20/0x30 mm/truncate.c:424
 kill_bdev fs/block_dev.c:86 [inline]
 set_blocksize+0x24e/0x270 fs/block_dev.c:166
 sb_set_blocksize+0x2c/0xa0 fs/block_dev.c:175
 isofs_fill_super+0x10d7/0x1940 fs/isofs/inode.c:861
 mount_bdev+0x1e8/0x290 fs/super.c:1368
 isofs_mount+0x2d/0x40 fs/isofs/inode.c:1566
 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:2919 [inline]
 path_mount+0x11d4/0x1ce0 fs/namespace.c:3249
 do_mount fs/namespace.c:3262 [inline]
 __do_sys_mount fs/namespace.c:3470 [inline]
 __se_sys_mount+0x23d/0x2e0 fs/namespace.c:3447
 __x64_sys_mount+0x63/0x70 fs/namespace.c:3447
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x07 -> 0x00

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 6156 Comm: syz-executor.2 Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/08/18 15:53 upstream 614cb2751d31 a2fe1cb5 .config log report info KCSAN: data-race in xas_create / xas_find
ci2-upstream-kcsan-gce 2021/08/06 15:39 upstream 902e7f373fff 2f537099 .config log report info KCSAN: data-race in xas_create / xas_find
ci2-upstream-kcsan-gce 2021/07/02 20:07 upstream 3dbdb38e2869 55aa55c2 .config log report info KCSAN: data-race in xas_create / xas_find
ci2-upstream-kcsan-gce 2021/06/29 19:06 upstream c54b245d0118 9d2ab5df .config log report info KCSAN: data-race in xas_create / xas_find
ci2-upstream-kcsan-gce 2021/06/07 13:09 upstream 614124bea77e e59537be .config log report info KCSAN: data-race in xas_create / xas_find
* Struck through repros no longer work on HEAD.