[moderation] [mm?] KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range (5)

2 views
Skip to first unread message

syzbot

unread,
Feb 12, 2024, 3:22:16 AMFeb 12
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 841c35169323 Linux 6.8-rc4
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15406e42180000
kernel config: https://syzkaller.appspot.com/x/.config?x=b4c8befe72e5ccb8
dashboard link: https://syzkaller.appspot.com/bug?extid=1e7220e624c9df7fd0c2
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linu...@kvack.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b02f9751ec8d/disk-841c3516.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6d1cf3e4cecb/vmlinux-841c3516.xz
kernel image: https://storage.googleapis.com/syzbot-assets/08663581dfd8/bzImage-841c3516.xz

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

==================================================================
BUG: KCSAN: data-race in __filemap_remove_folio / file_write_and_wait_range

read-write to 0xffff88813dcc3528 of 8 bytes by task 24098 on cpu 1:
page_cache_delete mm/filemap.c:145 [inline]
__filemap_remove_folio+0x1d1/0x2d0 mm/filemap.c:223
__remove_mapping+0x341/0x460 mm/vmscan.c:756
remove_mapping+0x22/0x90 mm/vmscan.c:789
mapping_evict_folio mm/truncate.c:293 [inline]
mapping_try_invalidate+0x27d/0x3d0 mm/truncate.c:511
invalidate_mapping_pages+0x27/0x30 mm/truncate.c:549
ext4_dio_write_iter fs/ext4/file.c:619 [inline]
ext4_file_write_iter+0xda1/0xe10 fs/ext4/file.c:696
call_write_iter include/linux/fs.h:2085 [inline]
iter_file_splice_write+0x5de/0x950 fs/splice.c:743
do_splice_from fs/splice.c:941 [inline]
direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
splice_direct_to_actor+0x2fb/0x660 fs/splice.c:1108
do_splice_direct_actor fs/splice.c:1207 [inline]
do_splice_direct+0xd7/0x150 fs/splice.c:1233
do_sendfile+0x3b9/0x960 fs/read_write.c:1295
__do_sys_sendfile64 fs/read_write.c:1362 [inline]
__se_sys_sendfile64 fs/read_write.c:1348 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
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 0xffff88813dcc3528 of 8 bytes by task 24106 on cpu 0:
mapping_needs_writeback mm/filemap.c:626 [inline]
file_write_and_wait_range+0x67/0x190 mm/filemap.c:778
ext4_sync_file+0x133/0x6c0 fs/ext4/fsync.c:158
vfs_fsync_range+0x111/0x120 fs/sync.c:188
generic_write_sync include/linux/fs.h:2735 [inline]
iomap_dio_complete+0x36a/0x4c0 fs/iomap/direct-io.c:126
iomap_dio_rw+0x62/0x90 fs/iomap/direct-io.c:752
ext4_dio_write_iter fs/ext4/file.c:577 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:696
call_write_iter include/linux/fs.h:2085 [inline]
iter_file_splice_write+0x5de/0x950 fs/splice.c:743
do_splice_from fs/splice.c:941 [inline]
direct_splice_actor+0x167/0x2c0 fs/splice.c:1164
splice_direct_to_actor+0x2fb/0x660 fs/splice.c:1108
do_splice_direct_actor fs/splice.c:1207 [inline]
do_splice_direct+0xd7/0x150 fs/splice.c:1233
do_sendfile+0x3b9/0x960 fs/read_write.c:1295
__do_sys_sendfile64 fs/read_write.c:1362 [inline]
__se_sys_sendfile64 fs/read_write.c:1348 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1348
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: 0x0000000000000010 -> 0x000000000000000f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24106 Comm: syz-executor.0 Not tainted 6.8.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================


---
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,
Apr 16, 2024, 5:26:17 AM (11 days ago) Apr 16
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