[moderation] [mm?] KCSAN: data-race in __filemap_remove_folio / filemap_write_and_wait_range (3)

3 views
Skip to first unread message

syzbot

unread,
Dec 8, 2023, 7:02:21 PM12/8/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 1b8af6552cb7 Merge tag 'powerpc-6.7-3' of git://git.kernel..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12893172e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=efc18f367a3f97fa
dashboard link: https://syzkaller.appspot.com/bug?extid=621c1f180675b25d9009
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [bra...@kernel.org djw...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org linu...@vger.kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2dbebc9ea594/disk-1b8af655.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/41592181ba2a/vmlinux-1b8af655.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b72b3a6a43ae/bzImage-1b8af655.xz

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

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

read-write to 0xffff8881080f22e8 of 8 bytes by task 26343 on cpu 1:
page_cache_delete mm/filemap.c:144 [inline]
__filemap_remove_folio+0x1d1/0x2d0 mm/filemap.c:222
invalidate_complete_folio2 mm/truncate.c:584 [inline]
invalidate_inode_pages2_range+0x404/0x720 mm/truncate.c:671
kiocb_invalidate_pages+0x1b1/0x1e0 mm/filemap.c:2705
__iomap_dio_rw+0x5ad/0x1090 fs/iomap/direct-io.c:638
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
do_iter_write+0x4ad/0x770 fs/read_write.c:860
vfs_iter_write+0x56/0x70 fs/read_write.c:901
iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3c4/0x980 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff8881080f22e8 of 8 bytes by task 26336 on cpu 0:
mapping_needs_writeback mm/filemap.c:625 [inline]
filemap_write_and_wait_range+0x51/0x210 mm/filemap.c:674
kiocb_invalidate_pages+0x87/0x1e0 mm/filemap.c:2694
__iomap_dio_rw+0x5ad/0x1090 fs/iomap/direct-io.c:638
iomap_dio_rw+0x40/0x90 fs/iomap/direct-io.c:748
ext4_dio_write_iter fs/ext4/file.c:575 [inline]
ext4_file_write_iter+0xa8a/0xe10 fs/ext4/file.c:694
do_iter_write+0x4ad/0x770 fs/read_write.c:860
vfs_iter_write+0x56/0x70 fs/read_write.c:901
iter_file_splice_write+0x462/0x7e0 fs/splice.c:736
do_splice_from fs/splice.c:933 [inline]
direct_splice_actor+0x8a/0xb0 fs/splice.c:1142
splice_direct_to_actor+0x31d/0x690 fs/splice.c:1088
do_splice_direct+0x10d/0x190 fs/splice.c:1194
do_sendfile+0x3c4/0x980 fs/read_write.c:1254
__do_sys_sendfile64 fs/read_write.c:1322 [inline]
__se_sys_sendfile64 fs/read_write.c:1308 [inline]
__x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1308
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x000000000000012b -> 0x0000000000000127

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 26336 Comm: syz-executor.1 Tainted: G W 6.7.0-rc3-syzkaller-00298-g1b8af6552cb7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
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
Reply all
Reply to author
Forward
0 new messages