[moderation] [ext4?] KCSAN: data-race in xas_find_marked / xas_init_marks (5)

2 views
Skip to first unread message

syzbot

unread,
Mar 19, 2025, 11:45:30 PM3/19/25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a7f2e10ecd8f Merge tag 'hwmon-fixes-for-v6.14-rc8/6.14' of..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14fae004580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f33d372c4021745
dashboard link: https://syzkaller.appspot.com/bug?extid=f8fb17c006cf6a2bbbb1
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [adilger...@dilger.ca linux...@vger.kernel.org linux-...@vger.kernel.org ty...@mit.edu]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/614aabc71b48/disk-a7f2e10e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d47dd90a010a/vmlinux-a7f2e10e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/418d8cf8782b/bzImage-a7f2e10e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f8fb17...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in xas_find_marked / xas_init_marks

read-write to 0xffff8881066db230 of 8 bytes by task 5500 on cpu 0:
instrument_read_write include/linux/instrumented.h:55 [inline]
__instrument_read_write_bitop include/asm-generic/bitops/instrumented-non-atomic.h:84 [inline]
___test_and_clear_bit include/asm-generic/bitops/instrumented-non-atomic.h:114 [inline]
node_clear_mark lib/xarray.c:102 [inline]
xas_clear_mark lib/xarray.c:921 [inline]
xas_init_marks+0x17e/0x320 lib/xarray.c:954
xas_store+0x228/0xc90 lib/xarray.c:816
page_cache_delete_batch mm/filemap.c:312 [inline]
delete_from_page_cache_batch+0x31c/0x700 mm/filemap.c:334
truncate_inode_pages_range+0x1c5/0x6b0 mm/truncate.c:327
truncate_inode_pages mm/truncate.c:407 [inline]
truncate_pagecache+0x53/0x70 mm/truncate.c:716
ext4_setattr+0xa01/0xf60 fs/ext4/inode.c:5536
notify_change+0x85c/0x8e0 fs/attr.c:552
do_truncate fs/open.c:65 [inline]
do_ftruncate+0x332/0x440 fs/open.c:192
do_sys_ftruncate fs/open.c:207 [inline]
__do_sys_ftruncate fs/open.c:212 [inline]
__se_sys_ftruncate fs/open.c:210 [inline]
__x64_sys_ftruncate+0x67/0xc0 fs/open.c:210
x64_sys_call+0x9d9/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:78
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 0xffff8881066db230 of 8 bytes by task 5497 on cpu 1:
xas_find_chunk include/linux/xarray.h:1733 [inline]
xas_find_marked+0x217/0x650 lib/xarray.c:1377
find_get_entry+0x54/0x390 mm/filemap.c:2027
filemap_get_folios_tag+0x136/0x210 mm/filemap.c:2294
mpage_prepare_extent_to_map+0x329/0xb80 fs/ext4/inode.c:2448
ext4_do_writepages+0x6ea/0x2130 fs/ext4/inode.c:2688
ext4_writepages+0x159/0x2e0 fs/ext4/inode.c:2824
do_writepages+0x1d8/0x480 mm/page-writeback.c:2687
filemap_fdatawrite_wbc mm/filemap.c:388 [inline]
__filemap_fdatawrite_range mm/filemap.c:421 [inline]
file_write_and_wait_range+0x168/0x2f0 mm/filemap.c:796
generic_buffers_fsync_noflush+0x46/0x120 fs/buffer.c:600
ext4_fsync_nojournal fs/ext4/fsync.c:88 [inline]
ext4_sync_file+0x1ff/0x6c0 fs/ext4/fsync.c:151
vfs_fsync_range fs/sync.c:187 [inline]
vfs_fsync fs/sync.c:201 [inline]
do_fsync fs/sync.c:212 [inline]
__do_sys_fdatasync fs/sync.c:222 [inline]
__se_sys_fdatasync fs/sync.c:220 [inline]
__x64_sys_fdatasync+0x7e/0xd0 fs/sync.c:220
x64_sys_call+0x15e1/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:76
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: 0xfffffff000000000 -> 0xffffe00000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5497 Comm: syz.4.717 Tainted: G W 6.14.0-rc7-syzkaller-00074-ga7f2e10ecd8f #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 29, 2025, 8:06:20 AM8/29/25
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages